You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com> on 2009/04/16 07:06:12 UTC

opening a searcher lazily

hi,
is it required to open the searcher in the constructor of SolrCore?.
We have a usecase where we just open a SolrCore to write a document
and close it. Opening the searcher is proving to be quite expensive
for us.

-- 
--Noble Paul

Re: opening a searcher lazily

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
There was a deadlock issue originally when the searcher was loaded
lazily. That is when we introduced the getNewestSearcher() method in
SolrCore

On Tue, Apr 28, 2009 at 11:43 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : is it required to open the searcher in the constructor of SolrCore?.
> : We have a usecase where we just open a SolrCore to write a document
> : and close it. Opening the searcher is proving to be quite expensive
> : for us.
>
> Hmmm... i suspect it was setup that way initially because "add" required
> a searcher to check for an existing doc to delete first.  conceptually we
> should be able to change the SolrCore so a searcher is only opened once
> needed -- but practically this may be a challenge ... i believe there are
> more then a few places where an assumtion is made about there being at
> least one open searcher.
>
>
>
> -Hoss
>
>



-- 
--Noble Paul

Re: opening a searcher lazily

Posted by Chris Hostetter <ho...@fucit.org>.
: is it required to open the searcher in the constructor of SolrCore?.
: We have a usecase where we just open a SolrCore to write a document
: and close it. Opening the searcher is proving to be quite expensive
: for us.

Hmmm... i suspect it was setup that way initially because "add" required 
a searcher to check for an existing doc to delete first.  conceptually we 
should be able to change the SolrCore so a searcher is only opened once 
needed -- but practically this may be a challenge ... i believe there are 
more then a few places where an assumtion is made about there being at 
least one open searcher.



-Hoss