Re: best way to compare Documents

2010-02-01 Thread Ian Lea
> ... > Is there some convenient way to compare Lucene Documents? Not that I know of. > I want to check if I should update a document based on whether field values > have changed and whether fields have been added or removed. > > Is it as simple as: > > newDoc.equals(oldDoc) No! > I don't need

Re: best way to compare Documents

2010-01-31 Thread Shashi Kant
or a CRC On Sun, Jan 31, 2010 at 11:58 AM, Shashi Kant wrote: > If all you want is to flag a document "dirty" you could hash the > fields in the document and and check for an update. > > > > On Sun, Jan 31, 2010 at 11:51 AM, Robert Koberg wrote: >> Hi, >> >> Just coming back to Lucene after a fe

Re: best way to compare Documents

2010-01-31 Thread Shashi Kant
If all you want is to flag a document "dirty" you could hash the fields in the document and and check for an update. On Sun, Jan 31, 2010 at 11:51 AM, Robert Koberg wrote: > Hi, > > Just coming back to Lucene after a few years. > > Is there some convenient way to compare Lucene Documents? > > I

best way to compare Documents

2010-01-31 Thread Robert Koberg
Hi, Just coming back to Lucene after a few years. Is there some convenient way to compare Lucene Documents? I want to check if I should update a document based on whether field values have changed and whether fields have been added or removed. Is it as simple as: newDoc.equals(oldDoc) ? I