Jens Kraemer wrote:
> On Wed, Mar 28, 2007 at 07:30:36PM +0100, Alex Fenton wrote:
>   
>> I'd like to be able to run fairly simple queries. I then need to look at 
>> each term match, and get its document id and the character (not byte) 
>> position at which it occurs in the source document.
>>     
> Without fully understanding what you want to achieve, I guess
> TermVectors are what you're looking for. 
Thank you - that class has exactly the data I need. Is there any way to 
extract the individual TermVectors implied by a set of search results?

#highlight seems to do this internally, but the only ruby way I've found 
to access TVs is via index.reader.term_vector(docid_id, :field). I'd 
like to be able to find the terms in results of eg a fuzzy or phrase search.
> I'm not sure if they're working
> on characters or bytes, though.
>   
Looks like bytes, but i can probably work round that.

thanks
alex
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to