lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: number of hits per document
Date Tue, 10 Jun 2008 13:03:58 GMT
A SpanQuery is just a Query, so the traditional way of Querying still  
applies, i.e. you get back a list of matching documents.  Beyond that,  
if you just want to operate on the spans, just keep track of how often  
the doc() method changes.

HTH,
Grant
On Jun 9, 2008, at 11:21 AM, John Byrne wrote:

> 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
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








---------------------------------------------------------------------
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