You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2005/06/13 14:24:41 UTC

Updating documents

Hi all,

I would like to update a document as follows.

1) retrieve the document from an IndexReader/Searcher
2) delete the document
3) manipulate the document, that is remove and add fields
4) save the document using an IndexWriter

When I do this all fields that were indexed and/or tokenized but not
stored get lost.

So is there any way to preserve fields that were not stored?
Reconstructing these fields is to expensive in my application.

Thanks in advance,

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Updating documents

Posted by Chris Hostetter <ho...@fucit.org>.
: When I do this all fields that were indexed and/or tokenized but not
: stored get lost.
:
: So is there any way to preserve fields that were not stored?
: Reconstructing these fields is to expensive in my application.

"preserving" those fields is pretty much the oposite of "not storing"
them.

i think some people have discussed the idea of using the term vector info
to reconstruct the token stream to recreate a doc with identical
properties from a search perspective, but in general, the most straight
forward way to achieve what you want is to store every field.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org