Re: multireader vs multisearcher

2007-12-02 Thread Doron Cohen
MultiReader is more efficient and is preferred when possible. MultiSearcher allows further functionality. Every time an index has more than a single segment (which is. to say almost every index except for after calling optimize()), Opening an IndexReader (or an IndexSearcher) above that index),

multireader vs multisearcher

2007-12-01 Thread John Wang
Hi: What is the difference between using: 1) MultiReader reader=; // create multi reader from different indexes IndexSearcher searcher=new IndexSearcher(reader); searcher.search(); vs. 2) IndexSearcher searcher1=... IndexSearcher searcher 2=.. MultiSearcher searcher=new

Re: MultiReader and MultiSearcher

2006-04-12 Thread Peter Keegan
Correction: the doc order is fine. My test was based on the existing 'TestMultiSearcher', and I hadn't noticed the swapping of the index order here: // VITAL STEP:adding the searcher for the empty index first, before the searcher for the populated index searchers[0] = new

Re: MultiReader and MultiSearcher

2006-04-11 Thread Peter Keegan
Yonik, Could you explain why an IndexSearcher constructed from multiple readers is faster than a MultiSearcher constructed from same readers? Thanks, Peter On 4/10/06, Yonik Seeley [EMAIL PROTECTED] wrote: On 4/10/06, oramas martín [EMAIL PROTECTED] wrote: Is there any performance (or

Re: MultiReader and MultiSearcher

2006-04-11 Thread Peter Keegan
why an IndexSearcher constructed from multiple readers is faster than a MultiSearcher constructed from same readers? The convergence layer is a level lower for a MultiReader vs a MultiSearcher. A MultiReader is an IndexReader, and Queries (Scorers) run directly against it since it has

Re: MultiReader and MultiSearcher

2006-04-11 Thread Yonik Seeley
On 4/11/06, Peter Keegan [EMAIL PROTECTED] wrote: Does this mean that MultiReader doesn't merge the search results and sort the results as if there was only one index? Correct, it doesn't. It supports the lower level primitives like TermEnum and TermDocs that searches use to run. A term query

Re: MultiReader and MultiSearcher

2006-04-11 Thread Yonik Seeley
On 4/11/06, Peter Keegan [EMAIL PROTECTED] wrote: Oops. I meant to say: Does this mean that an IndexSearcher constructed from a MultiReader doesn't merge the search results and sort the results as if there was only one index? That's how I answered it. A single search is done... the merging of

Re: MultiReader and MultiSearcher

2006-04-11 Thread Doug Cutting
Peter Keegan wrote: Oops. I meant to say: Does this mean that an IndexSearcher constructed from a MultiReader doesn't merge the search results and sort the results as if there was only one index? It doesn't have to, since a MultiReader *is* a single index. A quick test indicates that it does

MultiReader and MultiSearcher

2006-04-10 Thread oramas martín
Is there any performance (or other) difference between using an IndexSearcher initialized with a MultiReader instead of using a MultiSearcher? Thanks, Jose L. Oramas

Re: MultiReader and MultiSearcher

2006-04-10 Thread Yonik Seeley
On 4/10/06, oramas martín [EMAIL PROTECTED] wrote: Is there any performance (or other) difference between using an IndexSearcher initialized with a MultiReader instead of using a MultiSearcher? Yes, the IndexSearcher(MultiReader) solution will be faster. -Yonik

Re: How do lucene IDs work with MultiReader and MultiSearcher?

2005-06-21 Thread Erik Hatcher
the right document back. (i.e. my hits object gives me a lucene ID of 5 for my first hit, and if I ask the multireader for document with lucene ID 5, I get the same document) Is this always going to be the case? Do I simply have to ensure that I open the MultiReader and MultiSearcher