Hello Puneeth, When you pass an `after` doc, Lucene will filter out documents that compare better than this `after` document if it can. See e.g. what LongComparator does with its `topValue`, which is the value of the `after` doc.
On Thu, Apr 11, 2024 at 4:34 PM Puneeth Bikkumanla <pbikkuma...@gmail.com> wrote: > Hello, > I was wondering if a user-defined Query is optimized the same way in both > search/searchAfter provided the index stays the same (no CRUD takes place). > > In searchAfter we pass in an "after" doc so I was wondering if that changes > how a query is optimized at all. By looking at the code, I'm thinking no > but was wondering if there were any other parameters here that I am not > aware of that would influence query optimization differently in > search/searchAfter. Thanks! > -- Adrien