Jens Kraemer wrote: >> #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. >> > > you will get the doc_ids back from your search, so wouldn't it work to > just do a search_each and retrieve the term vectors inside the block? > > index.search_each(query) do |doc_id, score| > tv = index.reader.term_vector(doc_id, :field) > end > I'll give it a try, but if it was a fuzzy match I'm not sure I would know the exact term that was matched. Similarly with a phrase match - think I would have to manually verify that a particular occurrence of one term met the phrase criteria.
thanks alex _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

