On Wed, Nov 18, 2015 at 10:22 PM, Gerald Richter <[email protected]> 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
refreshed.

Marvin Humphrey

Reply via email to