You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by pb...@gmx.net on 2005/11/29 14:47:35 UTC

Determine the index of a hit after using MultiSearcher

Hello,

I am searching over multiple indices using MultiSearcher. Thus I get hits
from various indices. Is it possible to determine from which index a hit
comes?

The solution I found is to store the index in a document's field, but this
causes some overhead. I would like to find another solution.

Thank you for having read this!

Peter


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


Re: Determine the index of a hit after using MultiSearcher

Posted by Paul Elschot <pa...@xs4all.nl>.
On Tuesday 29 November 2005 22:42, Paul Elschot wrote:
> On Tuesday 29 November 2005 14:47, pbatcoi@gmx.net wrote:
> > Hello,
> > 
> > I am searching over multiple indices using MultiSearcher. Thus I get hits
> > from various indices. Is it possible to determine from which index a hit
> > comes?
> 
> Yes: use the subIndex() and maybe subDoc() methods here:

That should have been the subSearcher() method as Erik already replied.

Regards,
Paul Elschot.


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


Re: Determine the index of a hit after using MultiSearcher

Posted by Paul Elschot <pa...@xs4all.nl>.
On Tuesday 29 November 2005 14:47, pbatcoi@gmx.net wrote:
> Hello,
> 
> I am searching over multiple indices using MultiSearcher. Thus I get hits
> from various indices. Is it possible to determine from which index a hit
> comes?

Yes: use the subIndex() and maybe subDoc() methods here:

http://lucene.apache.org/java/docs/api/org/apache/lucene/search/MultiSearcher.html

Regards,
Paul Elschot


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