lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: manipulating content of stored fields
Date Fri, 07 Feb 2003 18:21:57 GMT
Lucene does not permit one to modify documents that are already indexed. 
  You must delete them and re-index them, even if changes are only to 
non-indexed fields.  Lucene should not be used as a document database. 
It is a full-text indexing library, which, as a convenience, permits one 
to store unindexed fields with documents.


sim luc wrote:
> Hello,
> Would it be possible to write a method which alows manipulating the content
> of a stored field belonging to a document which has already been added to
> the index? I'm pretty shure the answer is yes, but would the method do it's
> job with a decent performance? Of cource this method shouldn't work for
> fields which are indexed since their content is in the inverted index and
> changing it there would take ages, or only changing it at one place would
> cause a lot of confusion.
> (Please correct me if i am wrong with the assumption that the values of the
> fields which are stored get saved in a "non inverted" maner)
> The use of such a method / my problem:
> If i need to index a document which consists of a template, which has
> already
> been added to the index, and some additional content, then i would only need
> to add the a document with the additional content to the index. The document
> representing the template would get the id of the the new document added to
> a stored field which holds all the ids of the documents which use it as a
> template. If searching returns a template document then the stored field
> could
> be read and all the documents which base on the template could be found.
> (btw: it's not that lucene would take to much time to add the content of the
> template to the index several times. The problem is that i can't get the
> content
> of the template when i need to add the document to the index without loosing
> a lot of time.)
> Thanks in advance for any replys on how / where to write such a method or
> an alternative solution for my problem.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message