Paging while indexes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Paging while indexes

Bram Van Dam
Is there any way to take the current index version (or commit number or
something) into account in paged queries? When navigating through a
large result set in an NRT environment, I want the navigation to remain
*fixed* on the initial results.

I'm trying to avoid a scenario where a user has a page of results,
clicks next, and then has some of those results from the first page show
up again because the index changed in the mean while.

Thanks,

  - Bram
Reply | Threaded
Open this post in threaded view
|

Re: Paging while indexes

Shalin Shekhar Mangar
You can use the Cursor based paging API added in 4.7 which is much more
resilient to index updates.

See the section titled "How cursors are Affected by Index Updates" at
https://cwiki.apache.org/confluence/display/solr/Pagination+of+Results


On Mon, Jun 23, 2014 at 2:08 PM, Bram Van Dam <[hidden email]> wrote:

> Is there any way to take the current index version (or commit number or
> something) into account in paged queries? When navigating through a large
> result set in an NRT environment, I want the navigation to remain *fixed*
> on the initial results.
>
> I'm trying to avoid a scenario where a user has a page of results, clicks
> next, and then has some of those results from the first page show up again
> because the index changed in the mean while.
>
> Thanks,
>
>  - Bram
>



--
Regards,
Shalin Shekhar Mangar.
Reply | Threaded
Open this post in threaded view
|

Re: Paging while indexes

Shalin Shekhar Mangar
There's also a new searcher lease feature which might land in Solr in
future.

https://issues.apache.org/jira/browse/SOLR-2809


On Fri, Jun 27, 2014 at 1:18 AM, Shalin Shekhar Mangar <
[hidden email]> wrote:

> You can use the Cursor based paging API added in 4.7 which is much more
> resilient to index updates.
>
> See the section titled "How cursors are Affected by Index Updates" at
> https://cwiki.apache.org/confluence/display/solr/Pagination+of+Results
>
>
> On Mon, Jun 23, 2014 at 2:08 PM, Bram Van Dam <[hidden email]>
> wrote:
>
>> Is there any way to take the current index version (or commit number or
>> something) into account in paged queries? When navigating through a large
>> result set in an NRT environment, I want the navigation to remain *fixed*
>> on the initial results.
>>
>> I'm trying to avoid a scenario where a user has a page of results, clicks
>> next, and then has some of those results from the first page show up again
>> because the index changed in the mean while.
>>
>> Thanks,
>>
>>  - Bram
>>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



--
Regards,
Shalin Shekhar Mangar.