lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepan Chakravarthy <>
Subject updating document
Date Wed, 09 Aug 2006 17:44:13 GMT
 We have to update few documents in our index. We have add a additional
field to them. We did as follows

1)read the documents of our interest using IndexReader
2)copy them to a temporary doc object (temp_doc)
3)delete the document in the index 
4)close the IndexReader
5)open the IndexWriter
6)add a new field to (temp_doc)
7)add the (temp_doc) to the index using IndexWriter
8)close the IndexWriter

The problem:
1)Those documents that we updated are not searchable now. When we
perform search based we not find any of those documents we updated.
(using IndexSearcher)

2)But we are still able to read the updated documents using IndexReader.

1)When i want to update a document by adding a field, should i reindex
all the fields again? will copying the existing document not help and
adding new field not help ? 

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

View raw message