lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen Peddi" <>
Subject Re: partial updating of lucene
Date Thu, 09 Dec 2004 14:48:28 GMT
But when I am searching, it only searches in the index. Stored fields are 
only used to display the results, not to search. Why would it lose the terms 
in the index when I retrieve the document?

First solution is not possible (I can't create a new document) since I only 
have modified fields.

When I get a document, doesn't the fields have indexed terms along with it? 
Is there no way to get a full document (along with indexed terms) and clone 
it and add it to the index?

Well is there anyway I ca update a document with just one field (because I 
only have data for that one field)?


----- Original Message ----- 
From: "Justin Swanhart" <>
To: "Lucene Users List" <>
Sent: Wednesday, December 08, 2004 5:59 PM
Subject: Re: partial updating of lucene

> You unstored fields were not stored in the index, only their terms
> were stored.  When you get the document from the index and modify it,
> those terms are lost when you add the document again.
> You can either simply create a new document and populate all the
> fields and add that document to the index, or you can add the unstored
> fields to the document retrieved in step 1.
> On Wed, 8 Dec 2004 17:53:26 -0500, Praveen Peddi
> <> wrote:
>> 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
>> **************************************************************
>> Praveen Peddi
>> Sr Software Engg, Context Media, Inc.
>> Tel:  401.854.3475
>> Fax:  401.861.3596
>> web:
>> **************************************************************
>> Context Media- "The Leader in Enterprise Content Integration"
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message