lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Southam <>
Subject [lucy-user] Getting matched query terms for HitDocs
Date Thu, 29 Aug 2013 04:32:13 GMT
So let's say I have a query like:
	(dog OR cat OR bird) animal

And the text I'm indexing is like this
	A dog is an animal
	Cats and Dogs are animals
	A tree is not an animal

Of course (with stemming) the following two entries should be matched:
	A dog is an animal
	Cats and Dogs are animals

How do I get what query terms/phrases were found so I know that doc_id 1
matched against (dog, animal) and doc_id 2 matched (cat, dog, animal)?
I'm looking for something similar in functionality to what Whoosh[1] and
Xapian[2] offer in this regard.

I tried looking at the highlighter source thinking that has to implement
similar logic, but my knowledge of C is next to nil and I didn't see any
thing like that in the Perl bindings that I could use.



Philip Southam
Chief Architect / Яeverse Эngineer

View raw message