On Sun, Dec 11, 2011 at 8:42 AM, Shai Erera <[email protected]> wrote:
>
>> Because indexsearcher is about things like searching and scoring (not
>> opening and closing readers).
>
>
> I'm not sure why you make this distinction. True, it is lighter-weight than
> IndexReader, but we still have SearcherManager and not ReaderManager, so
> obviously someone thought that it's not as cheap to init an IndexSearcher
> for every search request (otherwise, you wouldn't need LUCENE-3636 right?).
>

Well I think its an important distinction: previously the distinction
was painfully obvious, Searcher didn't even necessarily require
IndexReader (e.g. RemoteSearcher)
But we changed it to require IndexReader because of problems with
rewrite() etc (demorgan bug).

I still think the distinction makes sense: IndexSearcher controls the
search behavior (you set similarity on it, you can feed distributed
stats to it, etc etc).
The change on LUCENE-3636 really isn't about cheapness, its about how
its awkward to do things like change up similarity or feed custom
stats to the IndexSearcher in SearcherManager.

-- 
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to