philipc wrote:
hi,

I'm trying to add a new field to all the documents in a lucene index.
After searching around, I found the only way to do an update is by retrieve the old documents, update it, delete it, then re-add
to index.

However, this worked for only preserving the stored fields.
i've lost all the unstored fields from the documents.
is there anyway to keep the unstored fields as well?

Or any way to go around the problem, ie, anyway to export the entire index to a csv file
and then update the cvs, and then import it back?

Here's an idea: create an index consisting of documents with just this field, adding documents in exactly the same order as they are in the other index. Then use ParallelReader to access both indexes at the same time - ParallelReader will present a merged view of both indexes. You can also use IndexWriter.addIndexes() to create a merged index.


--
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to