You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by rajani m <ra...@gmail.com> on 2024/02/13 21:57:59 UTC

firstSearcher listener replaying queries 3 times

Hi Solr Users,

  The first searcher listener replays the list of queries under the
listener list 3 times, wondering what could be the reason for it?

In the below example, when the collection is reloaded, the "q" is replayed
3 times, I expected it to be once.  Is it a bug or the first searcher
triggers any other listener?

<listener event="firstSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<lst><str name="q">cats</str></lst>
</arr>
</listener>

Re: firstSearcher listener replaying queries 3 times

Posted by rajani m <ra...@gmail.com>.
That makes sense, thank you.

On Fri, Feb 23, 2024 at 6:59 PM Chris Hostetter <ho...@fucit.org>
wrote:

>
> The obvious answer that comes to mind is that your collection has 3 shards
> and you have one replica for each shard on the node where you see this
> listern triggering 3 times on collection reload.  (or some other situation
> that causes 3 replicas on this one node)
>
> firstSearcher and newSearcher events are processed on individual
> SolrIndexSearchers -- and each replica has it's own SolrIndexSearchers
>
> : Date: Tue, 13 Feb 2024 16:57:59 -0500
> : From: rajani m <ra...@gmail.com>
> : Reply-To: users@solr.apache.org
> : To: solr-user <so...@lucene.apache.org>
> : Subject: firstSearcher listener replaying queries 3 times
> :
> : Hi Solr Users,
> :
> :   The first searcher listener replays the list of queries under the
> : listener list 3 times, wondering what could be the reason for it?
> :
> : In the below example, when the collection is reloaded, the "q" is
> replayed
> : 3 times, I expected it to be once.  Is it a bug or the first searcher
> : triggers any other listener?
> :
> : <listener event="firstSearcher" class="solr.QuerySenderListener">
> : <arr name="queries">
> : <lst><str name="q">cats</str></lst>
> : </arr>
> : </listener>
> :
>
> -Hoss
> http://www.lucidworks.com/
>

Re: firstSearcher listener replaying queries 3 times

Posted by Chris Hostetter <ho...@fucit.org>.
The obvious answer that comes to mind is that your collection has 3 shards 
and you have one replica for each shard on the node where you see this 
listern triggering 3 times on collection reload.  (or some other situation 
that causes 3 replicas on this one node)

firstSearcher and newSearcher events are processed on individual 
SolrIndexSearchers -- and each replica has it's own SolrIndexSearchers

: Date: Tue, 13 Feb 2024 16:57:59 -0500
: From: rajani m <ra...@gmail.com>
: Reply-To: users@solr.apache.org
: To: solr-user <so...@lucene.apache.org>
: Subject: firstSearcher listener replaying queries 3 times
: 
: Hi Solr Users,
: 
:   The first searcher listener replays the list of queries under the
: listener list 3 times, wondering what could be the reason for it?
: 
: In the below example, when the collection is reloaded, the "q" is replayed
: 3 times, I expected it to be once.  Is it a bug or the first searcher
: triggers any other listener?
: 
: <listener event="firstSearcher" class="solr.QuerySenderListener">
: <arr name="queries">
: <lst><str name="q">cats</str></lst>
: </arr>
: </listener>
: 

-Hoss
http://www.lucidworks.com/