You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2009/12/25 07:40:29 UTC

[jira] Created: (SOLR-1687) add param for limiting start and rows params

add param for limiting start and rows params
--------------------------------------------

                 Key: SOLR-1687
                 URL: https://issues.apache.org/jira/browse/SOLR-1687
             Project: Solr
          Issue Type: Improvement
            Reporter: Hoss Man


conventional wisdom is that it doesn't make sense to paginate with "huge" pages, or to drill down "deep" into high numbered pages -- features like faceting tend to be a better UI experience, and less intensive on solr.

At the moment, Sold adminstrators can use "invariant" params to hardcode the "rows" param to something reasonable, but unless they only want to allow users to look at page one, the can't do much to lock down the "start" param expect inforce these rules in the client code

we should add new params that set an upper bound on both of these, which can then be specified as default/invarient params in solrconfig.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (SOLR-1687) add param for limiting start and rows params

Posted by blackcookie001 <bc...@gmail.com>.
[SpotVogue.com]Nice Wedding Dresses On sale, Stunning Selection Of Styles 
SpotVogue.com provides the best [url=http://www.spotvogue.com]china
products[/url] online and [url=http://www.spotvogue.com]china
wholesale[/url] service. Now  the [url=http://www.spotvogue.com]china
products[/url] offered
include:[url=http://www.spotvogue.com/wedding-apparel-c-230501.html]wedding
apparel[/url],
[url=http://www.spotvogue.com/wedding-apparel-wedding-dresses-c-230501_230503.html]wedding
dresses[/url],
[url=http://www.spotvogue.com/wedding-apparel-wedding-party-dresses-c-230501_230504.html]Wedding
Party Dresses [/url],
[url=http://www.spotvogue.com/wedding-apparel-bridesmaid-dresses-c-230501_230505.html]Bridesmaid
Dresses [/url],
[url=http://www.spotvogue.com/wedding-apparel-flower-girl-dresses-c-230501_230507.html]Flower
Girl Dresses[/url],
[url=http://www.spotvogue.com/wedding-apparel-mother-of-bride-dresses-c-230501_230508.html]Mother
of Bride Dresses [/url],
[url=http://www.spotvogue.com/wedding-apparel-plus-size-wedding-dresses-c-230501_230509.html]Plus
Size Wedding Dresses
[/url],[url=http://www.spotvogue.com/special-occasion-dresses-c-230502.html]Special
Occasion Dresses[/url],
[url=http://www.spotvogue.com/wedding-apparel-wedding-shoes-c-230501_230511.html]Wedding
Shoes [/url], [url=http://www.spotvogue.com/ski-suits-c-240549.html]ski
suits[/url],
[url=http://www.spotvogue.com/sleepwears-c-200481.html]sleepwears[/url],
[url=http://www.spotvogue.com/sleepwears-womens-sleepwears-c-200481_200485.html]womens
sleepwears [/url],
[url=http://www.spotvogue.com/womens-sleepwears-womens-pajamas-c-200481_200485_200489.html]womens
pajamas[/url],
[url=http://www.spotvogue.com/womens-sleepwears-womens-nightgowns-c-200481_200485_200488.html]womens
nightgowns[/url],
[url=http://www.spotvogue.com/womens-sleepwears-womens-robes-c-200481_200485_200490.html]womens
robes[/url],
[url=http://www.spotvogue.com/sleepwears-mens-sleepwears-c-200481_200484.html]mens
sleepwears[/url],
[url=http://www.spotvogue.com/bedding-duvet-covers-c-220495_220496.html]duvet
covers[/url],
[url=http://www.spotvogue.com/household-appliances-foot-bath-c-80348_80349.html]foot
bath basin[/url], and
[url=http://www.spotvogue.com/household-appliances-portable-dvd-player-c-80348_230500.html]portable
dvd player[/url]. Here you can enjoy the most secure shopping, best quality
and the most considerate shopping service!
With the upcoming new years shopping season,
[url=http://www.spotvogue.com/wedding-apparel-wedding-dresses-c-230501_230503.html]wedding
dresses[/url] at SpotVogue.com are on sale. If you are trying to put
together a wedding or if you are a seller of
[url=http://www.spotvogue.com/wedding-apparel-wedding-dresses-c-230501_230503.html]wedding
dresses[/url], here comes the chance for you to save more! With only $69
now, you will get a fabulous
[url=http://www.spotvogue.com/wedding-apparel-wedding-dresses-c-230501_230503.html]wedding
dress[/url].
SpotVogue.com can save you from the bank-breaking shopping risk. Shop now
you can enjoy 5% off on your first order! 
Website: http://www.spotvogue.com

[IMG]http://farm3.static.flickr.com/2764/4210302904_c2358f3246_o.jpg[/IMG]  
[IMG]http://farm3.static.flickr.com/2517/4210303076_cf7000d91c_o.jpg[/IMG]  
[IMG]http://farm5.static.flickr.com/4066/4209538377_0761e19da2_o.jpg[/IMG] 
[IMG]http://farm3.static.flickr.com/2607/4210303420_652a7b28e5_o.jpg[/IMG]

-- 
View this message in context: http://old.nabble.com/-jira--Created%3A-%28SOLR-1687%29-add-param-for-limiting-start-and-rows-params-tp26919243p26919307.html
Sent from the Solr - Dev mailing list archive at Nabble.com.


[jira] Commented: (SOLR-1687) add param for limiting start and rows params

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794543#action_12794543 ] 

Hoss Man commented on SOLR-1687:
--------------------------------

suggest "start.max" and "rows.max" ... behavior would be to simply error if start > start.max or rows > rows.max.


> add param for limiting start and rows params
> --------------------------------------------
>
>                 Key: SOLR-1687
>                 URL: https://issues.apache.org/jira/browse/SOLR-1687
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>
> conventional wisdom is that it doesn't make sense to paginate with "huge" pages, or to drill down "deep" into high numbered pages -- features like faceting tend to be a better UI experience, and less intensive on solr.
> At the moment, Sold adminstrators can use "invariant" params to hardcode the "rows" param to something reasonable, but unless they only want to allow users to look at page one, the can't do much to lock down the "start" param expect inforce these rules in the client code
> we should add new params that set an upper bound on both of these, which can then be specified as default/invarient params in solrconfig.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1687) add param for limiting start and rows params

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835075#action_12835075 ] 

Hoss Man commented on SOLR-1687:
--------------------------------

Hmmm... QParser.getSort is where the current sort/start/rows param parsing happens right now, but looking at it makes me realize there's some local params semantics to consider with something like this.

Currently, QParser.getSort won't consult the global params if any of sort/start/rows are specified as a local param (or if the caller explicitly says useGlobalParams=false, but there doesn't seem to be a code path where that happens)

but what should happen in these situations...

{code}
#1) q={!lucene rows.max=9999999999 rows=9999}foo&rows.max=100
#2) q={!lucene rows.max=100 v=$qq}&qq=foo&rows=9999999&rows.max=99999999999
{code}

situation #1 could come up if a greedy client attempted to ask for too many rows, and the admin has a configured invariant of rows.max=100 -- in which case we'd want the global rows.max param to superseded the local rows param.  But situation #2 is equally possible where the q param is an invariant set by the admin, and the other params come from a greedy client.

The best situation i can think of off the top of my head would be to ignore local param values for start.max and rows.max, and look for them as global params even if false==useGlobalParams.  That takes care of situation #1, and makes situation #2 easy to deal with by also adding rows.max=100 as an invariant outside of the local params.

Anyone see any holes in that?

> add param for limiting start and rows params
> --------------------------------------------
>
>                 Key: SOLR-1687
>                 URL: https://issues.apache.org/jira/browse/SOLR-1687
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>
> conventional wisdom is that it doesn't make sense to paginate with "huge" pages, or to drill down "deep" into high numbered pages -- features like faceting tend to be a better UI experience, and less intensive on solr.
> At the moment, Sold adminstrators can use "invariant" params to hardcode the "rows" param to something reasonable, but unless they only want to allow users to look at page one, the can't do much to lock down the "start" param expect inforce these rules in the client code
> we should add new params that set an upper bound on both of these, which can then be specified as default/invarient params in solrconfig.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1687) add param for limiting start and rows params

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835288#action_12835288 ] 

Yonik Seeley commented on SOLR-1687:
------------------------------------

There are a lot of params that people may want to restrict control of... and I'm not sure it makes sense to add mins and maxes for all of them.  Traditionally, this type of stuff  is delegated to the front-end clients to restrict.  Would it make more sense to add an optional component to check restrictions?  The restrictions could optionally be in the config for the component and thus wouldn't have to be looked up and parsed for every request.

> add param for limiting start and rows params
> --------------------------------------------
>
>                 Key: SOLR-1687
>                 URL: https://issues.apache.org/jira/browse/SOLR-1687
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: SOLR-1687.patch
>
>
> conventional wisdom is that it doesn't make sense to paginate with "huge" pages, or to drill down "deep" into high numbered pages -- features like faceting tend to be a better UI experience, and less intensive on solr.
> At the moment, Sold adminstrators can use "invariant" params to hardcode the "rows" param to something reasonable, but unless they only want to allow users to look at page one, the can't do much to lock down the "start" param expect inforce these rules in the client code
> we should add new params that set an upper bound on both of these, which can then be specified as default/invarient params in solrconfig.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1687) add param for limiting start and rows params

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-1687:
---------------------------

    Attachment: SOLR-1687.patch

patch with the logic i attempted to describe.  it doesn't contain any Unit Tests yet, but it seems to be working.

the real question is: are there any any holes i haven't plugged in the local/global param handling logic that a greedy client could exploit?

> add param for limiting start and rows params
> --------------------------------------------
>
>                 Key: SOLR-1687
>                 URL: https://issues.apache.org/jira/browse/SOLR-1687
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: SOLR-1687.patch
>
>
> conventional wisdom is that it doesn't make sense to paginate with "huge" pages, or to drill down "deep" into high numbered pages -- features like faceting tend to be a better UI experience, and less intensive on solr.
> At the moment, Sold adminstrators can use "invariant" params to hardcode the "rows" param to something reasonable, but unless they only want to allow users to look at page one, the can't do much to lock down the "start" param expect inforce these rules in the client code
> we should add new params that set an upper bound on both of these, which can then be specified as default/invarient params in solrconfig.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1687) add param for limiting start and rows params

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836930#action_12836930 ] 

Hoss Man commented on SOLR-1687:
--------------------------------

bq. Traditionally, this type of stuff is delegated to the front-end clients to restrict.

True, but my suggestion wasn't so much along the lines of "end users" entering really big numbers as much as that "client developers" might make mistakes, and this would allow a solr admin to lock things down in a sane way.

bq. Would it make more sense to add an optional component to check restrictions? The restrictions could optionally be in the config for the component and thus wouldn't have to be looked up and parsed for every request.

I like this idea, but given the way local versions of start/rows are treated special wouldn't we still need special like what i added in the patch to deal with them?  (a generic component added to the front of the list could check validate a list of global params, but it wouldn't have anyway of knowing for certain what other params later components might parse with a QParser.

> add param for limiting start and rows params
> --------------------------------------------
>
>                 Key: SOLR-1687
>                 URL: https://issues.apache.org/jira/browse/SOLR-1687
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: SOLR-1687.patch
>
>
> conventional wisdom is that it doesn't make sense to paginate with "huge" pages, or to drill down "deep" into high numbered pages -- features like faceting tend to be a better UI experience, and less intensive on solr.
> At the moment, Sold adminstrators can use "invariant" params to hardcode the "rows" param to something reasonable, but unless they only want to allow users to look at page one, the can't do much to lock down the "start" param expect inforce these rules in the client code
> we should add new params that set an upper bound on both of these, which can then be specified as default/invarient params in solrconfig.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.