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 Shalin Shekhar Mangar <sh...@gmail.com> on 2008/07/26 16:54:43 UTC

Question on newSearcher and commit callbacks

Hi,

A listener for newSearcher always get a null currentSearcher. The SolrCore
always calls listener.newSearcher(newSearcher,null);

Is that a bug or a feature?

Another question was related to commit listeners. When inside the postCommit
method, both core.getSearcher() and core.getNewestSearcher(false) seem to
get an old Searcher which do not have the documents added just before the
commit. I was using this callback in SOLR-622 and my test was not working.
When I accidently added two commit calls before a call to SpellChecker, I
got the correct results. Any idea what may be wrong?

-- 
Regards,
Shalin Shekhar Mangar.

Re: Question on newSearcher and commit callbacks

Posted by Yonik Seeley <yo...@apache.org>.
On Sat, Jul 26, 2008 at 10:54 AM, Shalin Shekhar Mangar
<sh...@gmail.com> wrote:
> A listener for newSearcher always get a null currentSearcher. The SolrCore
> always calls listener.newSearcher(newSearcher,null);
>
> Is that a bug or a feature?

Long standing cut-n-paste bug :-)
I just committed a fix (all the concurrency groundwork was already there).

-Yonik