lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dyzc" <>
Subject Re:RE: Can't get a hit
Date Fri, 30 Dec 2011 21:13:46 GMT
thanks that solved my problem.
------------------ Original ------------------
From:  "Uwe Schindler"<>;
Date:  Fri, Dec 30, 2011 05:27 AM
To:  "java-user"<>; 

Subject:  RE: Can't get a hit


IndexReaders, on which you are doing the search, are a snapshot of the index
at the time it was opened. Later commits by IndexWriter are not seen unless
you reopen the IndexReader. This can be done with
IndexReader.openIfChanged() (since Lucene 3.5) or IndexReader.reopen()
(before 3.5).


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Cheng []
> Sent: Thursday, December 29, 2011 5:27 PM
> To:
> Subject: Can't get a hit
> Hi,
> I need to save a list of records into an index on hard drive. I keep a
writer and a
> reader open till the end of the operation.
> My issue is that I need to compare each of the new records with each of
> records that have been saved into the index. There are plenty of duplicate
> records in the original list.
> To my surprise, I can't find a hit for a duplicate record on the fly
although I use
> the writer.commit() for every record that were being saved.
> However, if I intentionally stopped the operations (some of the records
> saved), I re-ran the list of records and lots of hits occurs.
> Please help!
> Thanks!

To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message