Hi Dmitry,

Yes, you could also implement your own custom SearchComponent.  In this 
component you could grab the query param, examine the query value, and based on 
that add the shards URL param with appropriate value, so that when the regular 
QueryComponent grabs stuff from the request, it has the correct shard in there 
already.

Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: Dmitry Kan <dmitry....@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Fri, June 3, 2011 2:47:00 AM
> Subject: Re: query routing with shards
> 
> Hi Otis,
> 
> I merely followed on the gmail's suggestion to include other  people into the
> recipients list, Yonik was the first one :) I won't do it  next time.
> 
> Thanks for a rapid reply. The reason for doing this query  routing is that we
> abstract the distributed SOLR from the client code for  security reasons
> (that is, we don't want to expose the entire shard farm to  the world, but
> only the frontend SOLR) and for better decoupling.
> 
> Is  it possible to implement a plugin to SOLR that would map queries  to
> shards?
> 
> We have other choices too, they'll take quite some time,  that's why I
> decided to quickly ask, if I was missing something from the SOLR  main
> components design and configuration.
> 
> Dmitry
> 
> On Fri, Jun 3,  2011 at 8:25 AM, Otis Gospodnetic <otis_gospodne...@yahoo.com
> >  wrote:
> 
> > Hi Dmitry (you may not want to additionally copy Yonik, he's  subscribed to
> > this
> > list, too)
> >
> >
> > It sounds  like you have the knowledge of which query maps to which shard.
> >   If
> > so, why not control/change the value of "shards" param in the request  to
> > your
> > front-end Solr (aka distributed request dispatcher)  within your app, which
> > is
> > the one calling Solr?
> >
> >  Otis
> > ----
> > Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> > Lucene  ecosystem search :: http://search-lucene.com/
> >
> >
> >
> > ----- Original  Message ----
> > > From: Dmitry Kan <dmitry....@gmail.com>
> > > To: solr-user@lucene.apache.org; yo...@lucidimagination.com
> >  > Sent: Thu, June 2, 2011 7:00:53 AM
> > > Subject: query routing with  shards
> > >
> > > Hello all,
> > >
> > > We have  currently several pretty fat logically isolated shards  with the
> >  same
> > > schema / solrconfig (indices are separate). We currently  have  one single
> > > front end SOLR (1.4) for the client code  calls. Since a client  code
> > query
> > > usually hits only  one shard, we are considering making a smart  routing
> > of
> >  > queries to the shards they map to. Can you please give some  pointers  as
> > to
> > > what would be an optimal way to achieve such a  routing inside  the front
> > end
> > > solr? Is there a way to  configure mapping inside the  solrconfig?
> > >
> > >  Thanks.
> > >
> > > --
> > > Regards,
> > >
> >  > Dmitry Kan
> > >
> >
> 
> 
> 
> -- 
> Regards,
> 
> Dmitry Kan
> 

Reply via email to