lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lu <chris...@gmail.com>
Subject Re: is there some dangerous bug in lucene?
Date Tue, 11 May 2010 23:11:17 GMT
If you are using field cache for field A, and updating field A, isn't it 
normal that the field A is not updated?

Field cache is keyed via index reader, it won't be efficient to reload 
the field cache for each updateDocument().

--
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
DBSight customer, a shopping comparison site, (anonymous per request) 
got 2.6 Million Euro funding!

On 5/11/2010 7:20 AM, luocanrao wrote:
> I have a problem. I found the store field in a document is not consistent.
>
> Here are some small case about my program.
>
>
>
> Field A = new Filed(Store.Yes,FieldAValue);
>
> FieldBValue.add(FieldAValue);            // FiledBValue is a container that
> contains other store field value, FiledBValue is like a complete document
> record
>
> Field B = new Filed(Store.Yes,FieldBValue);
>
> Document doc = new Document;
>
> doc.add(A); doc.add(B);
>
> indexWriter.updateDocument(new Term(..),doc);
>
>
>
>
>
> after a long time , today some body found some bug.
>
> I observe that value of filed A is the old value, but the value of field B
> is the new and right value.
>
> At first I thought maybe it was the bug of indexwriter.getReader(),
>
> but after I restart the program, the bug is still existing.
>
> Finally I have to reconstruct all the data to fix it.
>
>
>
> Ps : I use FieldCache to store the value of field A, not field B
>
> I use indexwriter.getReader() to get realtime search
>
>
>
> I hope somebody to help me explain it.
>
>
>    


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


Mime
View raw message