You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by medley <hk...@pt.lu> on 2013/06/21 11:32:27 UTC

Solr, Shards, multi cores and (reverse proxy)

Hello,

I have this kind of url :

"http://remoteserver/solr/leg0/select/?rows=10&version=2&fl=*
&shards=
remoteserver:80/solr/core0,
...
remoteserver:80/solr/core5,
...
remoteserver:80/solr/core9
&..........

There is only ONE Solr instance with multiple cores (core0 to core9) on the
same server.

I would like to know if it exists in Solr configuration files a mechanism
that makes the shard requests called locally on the server because it is the
same url and not to pass again through the (reverse) proxy in our case.

Regards
Medley



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Shards-multi-cores-and-reverse-proxy-tp4072094.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr, Shards, multi cores and (reverse proxy)

Posted by medley <hk...@pt.lu>.
* I have created a new RequestHandler and added the list of the shards :

...
<str
name="shards">localhost:8780/apache-solr/leg0,localhost:8780/apache-solr/leg1,localhost:8780/apache-solr/leg2,localhost:8780/apache-solr/leg3,localhost:8780/apache-solr/leg4,localhost:8780/apache-solr/leg5</str>
...


* In the url, I replaced &shards=... by &shards.qt

It is working well.

Thanks a lot of your help.





--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Shards-multi-cores-and-reverse-proxy-tp4072094p4073543.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr, Shards, multi cores and (reverse proxy)

Posted by Upayavira <uv...@odoko.co.uk>.
Create a new RequestHandler config, say /distrib. Requests will be
forwarded to /select, which doesn't have the shards parameter, and
everything will be just fine.

Upayavira

On Tue, Jun 25, 2013, at 02:17 PM, medley wrote:
> Thanks.
> 
> It is working now and the QTime has been divided by 10.
> 
> I would like to put the shard parameters in the requesthandler. I have
> one
> solr-config.xml file by core.
> 
> Is it possible to have a common solr-config.xml file and in that case, a
> common requesthandler ?
> 
> Regards
> Medley
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Shards-multi-cores-and-reverse-proxy-tp4072094p4073039.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr, Shards, multi cores and (reverse proxy)

Posted by medley <hk...@pt.lu>.
Thanks.

It is working now and the QTime has been divided by 10.

I would like to put the shard parameters in the requesthandler. I have one
solr-config.xml file by core.

Is it possible to have a common solr-config.xml file and in that case, a
common requesthandler ?

Regards
Medley



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Shards-multi-cores-and-reverse-proxy-tp4072094p4073039.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr, Shards, multi cores and (reverse proxy)

Posted by Shawn Heisey <so...@elyograg.org>.
On 6/21/2013 3:32 AM, medley wrote:
> I have this kind of url :
> 
> "http://remoteserver/solr/leg0/select/?rows=10&version=2&fl=*
> &shards=
> remoteserver:80/solr/core0,
> ...
> remoteserver:80/solr/core5,
> ...
> remoteserver:80/solr/core9
> &..........
> 
> There is only ONE Solr instance with multiple cores (core0 to core9) on the
> same server.
> 
> I would like to know if it exists in Solr configuration files a mechanism
> that makes the shard requests called locally on the server because it is the
> same url and not to pass again through the (reverse) proxy in our case.

Building on what Upayavira already told you, don't use the name/address
and port of the proxy in the shards request - use the names/addresses of
the actual Solr servers with the actual Solr port.

Also, you can put the shards parameter in the request handler
definition, with one caveat - the core with the shards parameter cannot
include itself on that shards parameter.  If you do that, then it will
try to include itself recursively and the request will never complete.

Putting the shards parameter in the request handler definition is
particularly powerful if you set up a core that has no index of its own,
but has the same schema and a similar config, except for including the
shards parameter and possibly the shards.qt parameter.  I call this
concept a broker core, but there is probably better terminology available.

Thanks,
Shawn


Re: Solr, Shards, multi cores and (reverse proxy)

Posted by Upayavira <uv...@odoko.co.uk>.
If they are running on port 8983, then you just use localhost:8983
instead of remoteserver:80. Those URLs will be used from the solr server
itself, so localhost should work.

Upayavira

On Fri, Jun 21, 2013, at 10:32 AM, medley wrote:
> Hello,
> 
> I have this kind of url :
> 
> "http://remoteserver/solr/leg0/select/?rows=10&version=2&fl=*
> &shards=
> remoteserver:80/solr/core0,
> ...
> remoteserver:80/solr/core5,
> ...
> remoteserver:80/solr/core9
> &..........
> 
> There is only ONE Solr instance with multiple cores (core0 to core9) on
> the
> same server.
> 
> I would like to know if it exists in Solr configuration files a mechanism
> that makes the shard requests called locally on the server because it is
> the
> same url and not to pass again through the (reverse) proxy in our case.
> 
> Regards
> Medley
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Shards-multi-cores-and-reverse-proxy-tp4072094.html
> Sent from the Solr - User mailing list archive at Nabble.com.