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 Ankita Patil <an...@germinait.com> on 2011/11/11 11:38:48 UTC

writing to shards

Hi,

I have an index which has the shard parameter pointing to 2 shards(server1,
server2).  While reading from the shards you query on the index with the
shard parameter and it will retrieve the documents from both the shards.
Now  I want to add the documents to their respective shards depending on a
parameter/field. Where do you specify that condition? or do we have to
handle it programmatically?.

Thanks in advance

Ankita

Re: writing to shards

Posted by Ankita Patil <an...@germinait.com>.
Oh ok. Thanks.

Ankita

On 13 November 2011 07:56, Erick Erickson <er...@gmail.com> wrote:

> You currently have to handle it programmatically. They are entirely
> separate
> Solr instances for all that they talk to each other, there's no way
> currently
> to just hand of the new document and have Solr "do the right thing", so
> you have to address the shard specifically...
>
> Some of the new Solr cloud stuff may change this, but that's not out there
> yet.
>
> Best
> Erick
>
> On Fri, Nov 11, 2011 at 5:38 AM, Ankita Patil
> <an...@germinait.com> wrote:
> > Hi,
> >
> > I have an index which has the shard parameter pointing to 2
> shards(server1,
> > server2).  While reading from the shards you query on the index with the
> > shard parameter and it will retrieve the documents from both the shards.
> > Now  I want to add the documents to their respective shards depending on
> a
> > parameter/field. Where do you specify that condition? or do we have to
> > handle it programmatically?.
> >
> > Thanks in advance
> >
> > Ankita
> >
>

Re: writing to shards

Posted by Erick Erickson <er...@gmail.com>.
You currently have to handle it programmatically. They are entirely separate
Solr instances for all that they talk to each other, there's no way currently
to just hand of the new document and have Solr "do the right thing", so
you have to address the shard specifically...

Some of the new Solr cloud stuff may change this, but that's not out there
yet.

Best
Erick

On Fri, Nov 11, 2011 at 5:38 AM, Ankita Patil
<an...@germinait.com> wrote:
> Hi,
>
> I have an index which has the shard parameter pointing to 2 shards(server1,
> server2).  While reading from the shards you query on the index with the
> shard parameter and it will retrieve the documents from both the shards.
> Now  I want to add the documents to their respective shards depending on a
> parameter/field. Where do you specify that condition? or do we have to
> handle it programmatically?.
>
> Thanks in advance
>
> Ankita
>