Hi Shawn,

>
> The standard request handler is usually the one named "/select". You may
> want to add a new handler for this purpose.


We are already using a custom request handler, Actually, there is no
/select handler in our solr config.


your message subject says you are in cloud mode.  If that is true, I
> think you are going to want to specify shards by name, not URL.


Yes, we are using solr cloud. The reason I don't want to specify the
shards' names is that a request can be sent to any replica of a shard based
on preference and availability but I specifically want to limit a request
to a PULL-type replica of a shard.

I am trying to replicate the behavior on this link,

https://solr.apache.org/guide/8_4/distributed-requests.html#limiting-which-shards-are-queried

This section

<--------
> Alternatively, you can specify a list of replicas you wish to use in place
> of a shard IDs by separating the replica IDs with commas:


http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=localhost:7574/solr/gettingstarted,localhost:8983/solr/gettingstarted
---->

But when I do this, my request goes in an infinite loop.

is there anything I can do to make it work? I just want to use some
specific set of replicas with shard.tolrent=true.





On Mon, Oct 10, 2022 at 5:07 PM Shawn Heisey <apa...@elyograg.org> wrote:

> On 10/10/22 01:57, Satya Nand wrote:
>
> >> *"Do not add the shards parameter to the standard request handler;
> doing so
> >> may cause search queries may enter an infinite loop. Instead, define a
> new
> >> request handler that uses the shards parameter, and pass distributed
> search
> >> requests to that handler."*
> >
> > so, How can we use shards parameters in solr config to limit the shards?
> I
> > think one alternative will be to pass the shards parameter in URL instead
> > of solrconfig.
> >
> > But we would want to use the solrconfig to limit the changes in config
> only.
>
> The standard request handler is usually the one named "/select". You may
> want to add a new handler for this purpose.
>
> Your message subject says you are in cloud mode.  If that is true, I
> think you are going to want to specify shards by name, not URL.  If you
> are in standalone mode (no zookeeper) then the way I handled that was to
> build a special core with an empty index that had a predefined list of
> shard URLs in the /select handler.  When I did that, I was using the
> "defaults" parameter config.  I think if I did it again I would use
> "invariants" so the user would not be able to override the list.
>
> Thanks,
> Shawn
>
>
On Mon, Oct 10, 2022 at 5:07 PM Shawn Heisey <apa...@elyograg.org> wrote:

> On 10/10/22 01:57, Satya Nand wrote:
>
> >> *"Do not add the shards parameter to the standard request handler;
> doing so
> >> may cause search queries may enter an infinite loop. Instead, define a
> new
> >> request handler that uses the shards parameter, and pass distributed
> search
> >> requests to that handler."*
> >
> > so, How can we use shards parameters in solr config to limit the shards?
> I
> > think one alternative will be to pass the shards parameter in URL instead
> > of solrconfig.
> >
> > But we would want to use the solrconfig to limit the changes in config
> only.
>
> The standard request handler is usually the one named "/select". You may
> want to add a new handler for this purpose.
>
> Your message subject says you are in cloud mode.  If that is true, I
> think you are going to want to specify shards by name, not URL.  If you
> are in standalone mode (no zookeeper) then the way I handled that was to
> build a special core with an empty index that had a predefined list of
> shard URLs in the /select handler.  When I did that, I was using the
> "defaults" parameter config.  I think if I did it again I would use
> "invariants" so the user would not be able to override the list.
>
> Thanks,
> Shawn
>
>

Reply via email to