lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Shalyminov <ishalymi...@yandex-team.ru>
Subject Re: Getting the number of all hits for the SpanQuery
Date Fri, 01 Feb 2013 16:15:00 GMT
Hi again!

So far I think that the easiest way to get all span matches is indeed this method (Lucene
v 4.1 code):
public Spans getSpans(final AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext>
termContexts)

But there is no annotation for this code except 'for internal use only', and the input parameters
do not make sense to me.

What are these objects for, and how does one build them?

-- 
Best Regards,
Igor Shalyminov

31.01.2013, 20:15, "Igor Shalyminov" <ishalyminov@yandex-team.ru>:
> Hello!
>
> I want to perform a SpanQuery and get the precise overall number of all hits throughout
the entire index (i.e. if the query words combination appears multiple times in a document,
I need that number counted).
> I've found a method called SpanQuery.getSpans, but the way of using it in the stable
release is somewhat changed (using it with just an IndexReader doesn't seem to be possible).
>
> What is the way to do this now?
>
> --
> Best Regards,
> Igor Shalyminov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org

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