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 Max Lynch <ih...@gmail.com> on 2010/08/30 03:19:06 UTC

Updating document without removing fields

Hi,
I have a master solr server and two slaves.  On each of the slaves I have
programs running that read the slave index, do some processing on each
document, add a few new fields, and commit the changes back to the master.

The problem I'm running into right now is one slave will update one document
and the other slave will eventually update the same document, but the
changes will overwrite each other.  For example, one slave will add a field
and commit the document, but the other slave won't have that field yet so it
won't duplicate the document when it updates the doc with its own new
field.  This causes the document to miss one set of fields from one of the
slaves.

Can I update a document without having to recreate it?  Is there a way to
update the slave and then have the slave commit the changes to the master
(adding new fields in the process?)

Thanks.

Re: Updating document without removing fields

Posted by Max Lynch <ih...@gmail.com>.
Thanks Lance.

I have decided to just put all of my processing on a bigger server along
with solr.  It's too bad, but I can manage.

-Max

On Sun, Aug 29, 2010 at 9:59 PM, Lance Norskog <go...@gmail.com> wrote:

> No. Document creation is all-or-nothing, fields are not updateable.
>
> I think you have to filter all of your field changes through a "join"
> server. That is,
> all field updates could go to a database and the master would read
> document updates
> from that database. Or, you could have one updater feed updates to the
> other, The
> sends all updates to the master.
>
> Lance
>
> On Sun, Aug 29, 2010 at 6:19 PM, Max Lynch <ih...@gmail.com> wrote:
> > Hi,
> > I have a master solr server and two slaves.  On each of the slaves I have
> > programs running that read the slave index, do some processing on each
> > document, add a few new fields, and commit the changes back to the
> master.
> >
> > The problem I'm running into right now is one slave will update one
> document
> > and the other slave will eventually update the same document, but the
> > changes will overwrite each other.  For example, one slave will add a
> field
> > and commit the document, but the other slave won't have that field yet so
> it
> > won't duplicate the document when it updates the doc with its own new
> > field.  This causes the document to miss one set of fields from one of
> the
> > slaves.
> >
> > Can I update a document without having to recreate it?  Is there a way to
> > update the slave and then have the slave commit the changes to the master
> > (adding new fields in the process?)
> >
> > Thanks.
> >
>
>
>
> --
> Lance Norskog
> goksron@gmail.com
>

Re: Updating document without removing fields

Posted by Lance Norskog <go...@gmail.com>.
No. Document creation is all-or-nothing, fields are not updateable.

I think you have to filter all of your field changes through a "join"
server. That is,
all field updates could go to a database and the master would read
document updates
from that database. Or, you could have one updater feed updates to the
other, The
sends all updates to the master.

Lance

On Sun, Aug 29, 2010 at 6:19 PM, Max Lynch <ih...@gmail.com> wrote:
> Hi,
> I have a master solr server and two slaves.  On each of the slaves I have
> programs running that read the slave index, do some processing on each
> document, add a few new fields, and commit the changes back to the master.
>
> The problem I'm running into right now is one slave will update one document
> and the other slave will eventually update the same document, but the
> changes will overwrite each other.  For example, one slave will add a field
> and commit the document, but the other slave won't have that field yet so it
> won't duplicate the document when it updates the doc with its own new
> field.  This causes the document to miss one set of fields from one of the
> slaves.
>
> Can I update a document without having to recreate it?  Is there a way to
> update the slave and then have the slave commit the changes to the master
> (adding new fields in the process?)
>
> Thanks.
>



-- 
Lance Norskog
goksron@gmail.com