lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: is there some dangerous bug in lucene?
Date Tue, 11 May 2010 15:31:13 GMT
Is it possible that you're looking at the deleted document? When you update
a document you're actually deleting the old one and adding a new one....

If not, I second Ian's comment that a self-contained test case will be very
useful.

HTH
Erick

On Tue, May 11, 2010 at 11:25 AM, Ian Lea <ian.lea@gmail.com> wrote:

> > is there some dangerous bug in lucene?
>
> Highly unlikely.  Much more likely that there is a bug in your code,
> perhaps somewhere in the confusing (to me, reading your uncompilable
> code snippet) cross linking of values between fields A and B.  Or
> you've got duplicate docs in the index.  Or something completely
> different.
>
> If you really do think it is a problem in lucene itself, or in your
> usage of lucene, I suggest that you break it down to the smallest
> possible self-contained test case or program that demonstrates the
> problem and post it here.  And tell us what version of lucene you are
> using.  Before doing that it would be worth using Luke to examine the
> index to double check that it holds what you thing it does.
>
>
> --
> Ian.
>
>
> On Tue, May 11, 2010 at 3:20 PM, luocanrao <luocan19826164@sohu.com>
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message