Thanks a lot.
-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: 06 March 2006 16:25
To: [email protected]
Subject: Re: Multisearch
On Mar 6, 2006, at 10:05 AM, WATHELET Thomas wrote:
> I made a multi search into my Lucene index. It's work properly but I
> would like to know if it's possible to know in witch index de document
> belong to.
This just came up the other day as well, and was covered in the
past. Here's the thread with the answer:
<http://www.nabble.com/Determine-the-index-of-a-hit-after-using-
MultiSearcher-t638218.html#a1706027>
And here are the relevant snippets:
MultiSearcher searcher = (MultiSearcher) context.getAttribute
("searcher");
IndexReader[] readers = (IndexReader[]) context.getAttribute
("readers");
Hits hits = searcher.search(query);
// later while iterating through Hits...
int indexIndex = searcher.subSearcher(hits.id(position));
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]