lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald Richter <rich...@ecos.de>
Subject [lucy-user] Strange results when documents gets delete while iterating
Date Thu, 19 Nov 2015 06:22:03 GMT
Hi,

I have a simple query that consists of a TermQuery and a RangeQuery, I 
am iterating over this query like this:

         while ($cnt-- >= 0 && ($hit = $hits -> next))
             {
             $data = $hit->get_fields() ;
             ....
             }

While this loop runs documents are deleted from the index by another 
process. Without this other process everything is fine. When this 
deletion is happeing, it seems that half of the documents that are 
returned by $hits -> next are wrong, which mean I get a totaly different 
document, which should not be part of the resultset.

I thought that a searcher operates on a snapshot, so changes that 
happens at the same time does not influence the query. Is this wrong? If 
yes, how could I make sure my resultset is not corrupted?

Thanks & Regards

Gerald





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message