Re: Query Optimization in search/searchAfter

2024-04-12 Thread Adrien Grand
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 wrote: >

Re: Query Optimization in search/searchAfter

2024-04-12 Thread Adrien Grand
You are correct, query rewriting is not affected by the use of search vs. searchAfter. On Fri, Apr 12, 2024 at 3:37 PM Puneeth Bikkumanla wrote: > Hello, > Sorry I should have clarified what I meant by “optimized”. I am familiar > with the collector/comparators using the “after” doc to filter

Re: Query Optimization in search/searchAfter

2024-04-12 Thread Puneeth Bikkumanla
Hello, Sorry I should have clarified what I meant by “optimized”. I am familiar with the collector/comparators using the “after” doc to filter out documents but I specifically was talking about the query rewriting phase. Is the query rewritten differently in search vs searchAfter? Looking at the

Re: Query Optimization in search/searchAfter

2024-04-12 Thread Puneeth Bikkumanla
Thanks Adrien! On Fri, Apr 12, 2024 at 9:49 AM Adrien Grand wrote: > You are correct, query rewriting is not affected by the use of search vs. > searchAfter. > > On Fri, Apr 12, 2024 at 3:37 PM Puneeth Bikkumanla > wrote: > > > Hello, > > Sorry I should have clarified what I meant by