lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Byrne <john.by...@propylon.com>
Subject number of hits per document
Date Mon, 09 Jun 2008 15:21:01 GMT
Hi,

Is there an easy way to find out the number of hits per document for a 
Query, rather than just for a Term?

Let's say, for example, I have a document like this:

"here is cats near dogs and here is cats a long long way from dogs"

and I use a SpanNearQuery to find "cats" near "dogs" with a slop of 1 - 
I need to be able to find out that there was 1 hit, even though there 
are 2 occurrences of "cats" and 2 of "dogs" - there is still only 1 hit 
that matches my Query.

Is this possible?

Thanks,
JB.




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message