lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen Peddi" <>
Subject partial updating of lucene
Date Wed, 08 Dec 2004 22:53:26 GMT
Hi all,
I have a question about updating the lucene document. I know that there is no API to do that
now. So this is what I am doing in order to update the document with the field "title".

1) Get the document from lucene index
2) Remove a field called "title" and add the same field with a modified value
3) Remove the docment (based on one of our field) using Reader and then close the Reader.
4) Add the document that is obtained in 1 and modified in 2.

I am not sure if this is the right way of doing it but I am having problems searching for
that document after updating it. The problem is only with the un stored fields.

For example, I search as "description:boy" where description is a unstored, indexed, tokenized
field in the document. I find 1 document. Now I update the document the document's title as
descripbed above and repeat the same search "description:boy" and now I don't find any results.
I have not touched the field "description" at all. I just updated the field title.

Is this an expected behaviour? If not, is it a bug.

If I change the field description as stored, indexed and tokenized, the search works fine
before and after updating.

Praveen Peddi
Sr Software Engg, Context Media, Inc. 
Tel:  401.854.3475 
Fax:  401.861.3596 
Context Media- "The Leader in Enterprise Content Integration" 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message