lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devon H. O'Dell" <>
Subject Re: No subsearcher in Lucene 3.3?
Date Mon, 29 Aug 2011 19:22:17 GMT
2011/8/29 Joseph MarkAnthony <>:
> Greetings,
>    In the past (Lucene version 2.x) I successfully used MultiSearcher.subsearcher()
to identify the searchable within a MultiSearcher to which a hit belonged.
> In moving to Lucene 3.3, MultiSearcher is now deprecated, and I am trying to create a
standard IndexSearcher over a MultiReader.  I haven't gotten this to work yet but it appears
to be the correct approach.  However, I cannot find any corresponding "subsearcher" method
that could identify which subreader is the one that finds the hit.
> For example, it used to be straightforward:
> Create a MultiSearcher over several Searchables, and call MultiSearcher.subsearcher to
get the searchable that holds each search hit.
> Now, I am creating an IndexSearcher over a MultiReader, which is created over an array
of IndexReaders.   So when I get a hit, what's the best way to determine which of the several
subReaders the hit came from?

If I'm understanding your question correctly, in the Collector, you
are told which IndexReader you are working with when the setNextReader
method is called. Hopefully that helps.


> Thanks in advance,
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message