Updating a single field of a document

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Updating a single field of a document

Amit Nithian
Is there a way in Solr 1.2 (or Solr 1.3) to update a single field of an
existing document if I know the primary key? Reason I ask is that I
construct a document from multiple sources and some fields may need periodic
updating from one of those sources. I would prefer not to have to
reconstruct the entire document (and hence query the multiple sources) for a
single field change.
I noticed that Solr 1.2 will delete and add the new document rather than
replace individual fields. Is there a way around this?

Thanks
Amit
Reply | Threaded
Open this post in threaded view
|

Re: Updating a single field of a document

Otis Gospodnetic-2

Amit,

This is still the case.  I believe 2 separate issues related to this exist in JIRA, but none is in a finished state.

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



----- Original Message ----

> From: Amit Nithian <[hidden email]>
> To: [hidden email]
> Sent: Friday, February 20, 2009 7:00:03 AM
> Subject: Updating a single field of a document
>
> Is there a way in Solr 1.2 (or Solr 1.3) to update a single field of an
> existing document if I know the primary key? Reason I ask is that I
> construct a document from multiple sources and some fields may need periodic
> updating from one of those sources. I would prefer not to have to
> reconstruct the entire document (and hence query the multiple sources) for a
> single field change.
> I noticed that Solr 1.2 will delete and add the new document rather than
> replace individual fields. Is there a way around this?
>
> Thanks
> Amit

Reply | Threaded
Open this post in threaded view
|

Re: Updating a single field of a document

Amit Nithian
Thanks Otis. Are these Solr specific issues. In looking through Lucene's
FAQ, it seems that you would have to delete the document and re-add. Could a
possible solution be to find the document by the unique-id and set the
fields that were changed or would this not scale when doing a lot of
document field updates?
Which JIRA issues were you referring to?

Thanks
Amit

On Thu, Feb 19, 2009 at 6:57 PM, Otis Gospodnetic <
[hidden email]> wrote:

>
> Amit,
>
> This is still the case.  I believe 2 separate issues related to this exist
> in JIRA, but none is in a finished state.
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
> > From: Amit Nithian <[hidden email]>
> > To: [hidden email]
> > Sent: Friday, February 20, 2009 7:00:03 AM
> > Subject: Updating a single field of a document
> >
> > Is there a way in Solr 1.2 (or Solr 1.3) to update a single field of an
> > existing document if I know the primary key? Reason I ask is that I
> > construct a document from multiple sources and some fields may need
> periodic
> > updating from one of those sources. I would prefer not to have to
> > reconstruct the entire document (and hence query the multiple sources)
> for a
> > single field change.
> > I noticed that Solr 1.2 will delete and add the new document rather than
> > replace individual fields. Is there a way around this?
> >
> > Thanks
> > Amit
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Updating a single field of a document

Shalin Shekhar Mangar
On Sat, Feb 21, 2009 at 1:00 AM, Amit Nithian <[hidden email]> wrote:

> Thanks Otis. Are these Solr specific issues. In looking through Lucene's
> FAQ, it seems that you would have to delete the document and re-add. Could
> a
> possible solution be to find the document by the unique-id and set the
> fields that were changed or would this not scale when doing a lot of
> document field updates?
> Which JIRA issues were you referring to?
>

https://issues.apache.org/jira/browse/SOLR-139
https://issues.apache.org/jira/browse/SOLR-828

--
Regards,
Shalin Shekhar Mangar.