lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dyzc" <1393975...@qq.com>
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"<uwe@thetaphi.de>;
Date:  Fri, Dec 30, 2011 05:27 AM
To:  "java-user"<java-user@lucene.apache.org>; 

Subject:  RE: Can't get a hit

 
Hi,

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

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Cheng [mailto:zhoucheng2008@gmail.com]
> Sent: Thursday, December 29, 2011 5:27 PM
> To: java-user@lucene.apache.org
> 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
the
> 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
being
> saved), I re-ran the list of records and lots of hits occurs.
> 
> Please help!
> 
> Thanks!


---------------------------------------------------------------------
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, 8-Bit, 0 bytes)
View raw message