You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter Keegan <pe...@gmail.com> on 2013/10/09 00:51:13 UTC

limiting deep pagination

Is there a way to configure Solr 'defaults/appends/invariants' such that
the product of the 'start' and 'rows' parameters doesn't exceed a given
value? This would be to prevent deep pagination.  Or would this require a
custom requestHandler?

Peter

Re: limiting deep pagination

Posted by Peter Keegan <pe...@gmail.com>.
Yes, right now this constraint could be implemented in either the web app
or Solr. I see now that many of the QTimes on these queries are <10 ms
(probably due to caching), so I'm a bit less concerned.


On Wed, Oct 16, 2013 at 2:13 AM, Furkan KAMACI <fu...@gmail.com>wrote:

> I just wonder that: Don't you implement a custom API that interacts with
> Solr and limits such kinds of requestst? (I know that you are asking about
> how to do that in Solr but I handle such situations at my custom search
> APIs and want to learn what fellows do)
>
>
> 9 Ekim 2013 Çarşamba tarihinde Michael Sokolov <
> msokolov@safaribooksonline.com> adlı kullanıcı şöyle yazdı:
> > On 10/8/13 6:51 PM, Peter Keegan wrote:
> >>
> >> Is there a way to configure Solr 'defaults/appends/invariants' such that
> >> the product of the 'start' and 'rows' parameters doesn't exceed a given
> >> value? This would be to prevent deep pagination.  Or would this require
> a
> >> custom requestHandler?
> >>
> >> Peter
> >>
> > Just wondering -- isn't it the sum that you should be concerned about
> rather than the product?  Actually I think what we usually do is limit both
> independently, with slightly different concerns, since. eg start=1,
> rows=1000 causes memory problems if you have large fields in your results,
> where start=1000, rows=1 may not actually be a problem
> >
> > -Mike
> >
>

Re: limiting deep pagination

Posted by Furkan KAMACI <fu...@gmail.com>.
I just wonder that: Don't you implement a custom API that interacts with
Solr and limits such kinds of requestst? (I know that you are asking about
how to do that in Solr but I handle such situations at my custom search
APIs and want to learn what fellows do)


9 Ekim 2013 Çarşamba tarihinde Michael Sokolov <
msokolov@safaribooksonline.com> adlı kullanıcı şöyle yazdı:
> On 10/8/13 6:51 PM, Peter Keegan wrote:
>>
>> Is there a way to configure Solr 'defaults/appends/invariants' such that
>> the product of the 'start' and 'rows' parameters doesn't exceed a given
>> value? This would be to prevent deep pagination.  Or would this require a
>> custom requestHandler?
>>
>> Peter
>>
> Just wondering -- isn't it the sum that you should be concerned about
rather than the product?  Actually I think what we usually do is limit both
independently, with slightly different concerns, since. eg start=1,
rows=1000 causes memory problems if you have large fields in your results,
where start=1000, rows=1 may not actually be a problem
>
> -Mike
>

Re: limiting deep pagination

Posted by Michael Sokolov <ms...@safaribooksonline.com>.
On 10/8/13 6:51 PM, Peter Keegan wrote:
> Is there a way to configure Solr 'defaults/appends/invariants' such that
> the product of the 'start' and 'rows' parameters doesn't exceed a given
> value? This would be to prevent deep pagination.  Or would this require a
> custom requestHandler?
>
> Peter
>
Just wondering -- isn't it the sum that you should be concerned about 
rather than the product?  Actually I think what we usually do is limit 
both independently, with slightly different concerns, since. eg start=1, 
rows=1000 causes memory problems if you have large fields in your 
results, where start=1000, rows=1 may not actually be a problem

-Mike

Re: limiting deep pagination

Posted by Erik Hatcher <er...@gmail.com>.
I'd recommend a custom "first-components" SearchComponent.  Then it could simply validate (or adjust) the parameters or throw an exception. 

Knowing Tomás - that's probably what he'd really do :) 
    
    Erik

On Oct 8, 2013, at 19:34, Tomás Fernández Löbbe <to...@gmail.com> wrote:

> I don't know of any OOTB way to do that, I'd write a custom request handler
> as you suggested.
> 
> Tomás
> 
> 
> On Tue, Oct 8, 2013 at 3:51 PM, Peter Keegan <pe...@gmail.com> wrote:
> 
>> Is there a way to configure Solr 'defaults/appends/invariants' such that
>> the product of the 'start' and 'rows' parameters doesn't exceed a given
>> value? This would be to prevent deep pagination.  Or would this require a
>> custom requestHandler?
>> 
>> Peter
>> 

Re: limiting deep pagination

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
I don't know of any OOTB way to do that, I'd write a custom request handler
as you suggested.

Tomás


On Tue, Oct 8, 2013 at 3:51 PM, Peter Keegan <pe...@gmail.com> wrote:

> Is there a way to configure Solr 'defaults/appends/invariants' such that
> the product of the 'start' and 'rows' parameters doesn't exceed a given
> value? This would be to prevent deep pagination.  Or would this require a
> custom requestHandler?
>
> Peter
>