On Wed, Mar 28, 2012 at 2:30 PM, Tim Eck <tim...@gmail.com> wrote: > Excuse my ignorance of lucene internals, but is the problem any easier if > the requirement is just to allow the addition/removal of stored only fields > (as opposed to indexed)?
It would substantially simplify the problem... but even this simplification is quite a bit of work. Lucene's segments are write-once, so when some number of documents in a given segment are updated, we'd need to write new files against that segment (we call this a "stacked segment"), sort of like a patch over the original segment. But Lucene's stored fields writer/reader impls are set up to handle this sort of "patching", so some work must be done to correlate docIDs in the patched segment against docIDs in the base segment... > I suspect this wasn't intent of the original question, but a document can > certainly be deleted and re-added to the index with a new set of fields. Ahh, right, I forgot to mention that: fully removing the original document, and then fully adding the new document (with all original fields, plus the new fields) is always possible... just not "ideal" if your update is tiny and your original fields are huge. Mike McCandless http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org