In terms of the impact upon the index, there is no difference, they do
the same thing - mark the previous doc deleted and insert another. As
jack says, maybe atomic updates are easier for you from an application
perspective.

Note Solr/lucene are heavily optimised towards reading - writing is a
relatively heavy operation.

Upayavira

On Fri, Mar 8, 2013, at 10:41 PM, Mingfeng Yang wrote:
> Then what's the difference between adding a new document vs.
> replacing/overwriting a document?
> 
> Ming-
> 
> 
> On Fri, Mar 8, 2013 at 2:07 PM, Upayavira <u...@odoko.co.uk> wrote:
> 
> > With an atomic update, you need to retrieve the stored fields in order
> > to build up the full document to insert back.
> >
> > In either case, you'll have to locate the previous version and mark it
> > deleted before you can insert the new version.
> >
> > I bet that the amount of time spent retrieving stored fields is matched
> > by the time saved by not having to transmit those fields over the wire,
> > although I'd be very curious to see someone actually test that.
> >
> > Upayavira
> >
> > On Fri, Mar 8, 2013, at 09:51 PM, Mingfeng Yang wrote:
> > > Generally speaking, which has better performance for Solr?
> > > 1. updating some fields or adding new fields into a document.
> > > or
> > > 2. replacing the whole document.
> > >
> > > As I understand,  update fields need to search for the corresponding doc
> > > first, and then replace field values.  While replacing the whole document
> > > is just like adding new document.  Is it right?
> >

Reply via email to