Thanks for clarifying...

In that case searchAfter have slightly more work to do of comparing docid
and batchid.

Also it is possible that same data is returned on subsequent
searchAfter with diff. doc ids... if I understand correctly.

On Monday 22 August 2016, Uwe Schindler <u...@thetaphi.de> wrote:

> Hi,
>
> SearchAfter always reexecutes the whole query regardless if the index
> changed or is a new index. It just sorts out documents, which are not part
> of the topdocs based on the criteria passed in as the last doc. It does
> this by comparing the docid and score before inserting it into the priority
> queue.
>
> If the index changed between 2 search requests, searchAfter() still works,
> but it may return different documents.
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de <javascript:;>
>
> > -----Original Message-----
> > From: Rajnish kamboj [mailto:rajnishk7.i...@gmail.com <javascript:;>]
> > Sent: Monday, August 22, 2016 5:22 PM
> > To: java-user@lucene.apache.org <javascript:;>
> > Subject: Re: searchAfter behavior after reindexing
> >
> > Please help me in understanding the behaviour of searchAfter().
> >
> > On Sunday 21 August 2016, Rajnish kamboj <rajnishk7.i...@gmail.com
> <javascript:;>>
> > wrote:
> >
> > > Hi Team
> > >
> > > What is the searchAfter behavior if index is continuously being
> updated.
> > > Document numbers changes if indexes are updated. Also indexes are
> > update
> > > on segment merge.
> > >
> > > Now, Suppose
> > > - I am holding a ScoreDoc before index update
> > > - Index is updated (document number changes).
> > >         (A document number may not be relevant in the context to
> > > searchAfter query)
> > > - I pass this ScoreDoc to searchAfter.
> > >
> > > Will searchAfter start after ScoreDoc document number OR it will search
> > > from scratch?
> > >
> > >
> > > Regards
> > > Rajnish
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> <javascript:;>
> For additional commands, e-mail: java-user-h...@lucene.apache.org
> <javascript:;>
>
>

Reply via email to