lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: [lucy-user] Strange results when documents gets delete while iterating
Date Thu, 19 Nov 2015 11:18:31 GMT
On Wed, Nov 18, 2015 at 10:22 PM, Gerald Richter <> wrote:

> 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?

What kind of a Searcher is this?  If it's an IndexSearcher operating
on a local index, I don't see how it could happen.  But if it's a
ClusterSearcher, then it would be possible if the remotes are being

Marvin Humphrey

View raw message