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 "Lars Kotthoff (JIRA)" <ji...@apache.org> on 2008/09/20 18:29:44 UTC
[jira] Created: (SOLR-781) Change facet.sort from boolean to string
and specify sort method explicitely
Change facet.sort from boolean to string and specify sort method explicitely
----------------------------------------------------------------------------
Key: SOLR-781
URL: https://issues.apache.org/jira/browse/SOLR-781
Project: Solr
Issue Type: New Feature
Affects Versions: 1.3
Reporter: Lars Kotthoff
The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654214#action_12654214 ]
Lars Kotthoff commented on SOLR-781:
------------------------------------
bq. Lars, I already committed some code to normalize on the new facet.sort values so we don't need to check for both new and legacy everywhere.
Ah sorry, missed that. Must have been in the gigantic diff :)
bq. Also, you didn't miss those string constants - I removed those two cases since they were being used for the wrong variable (facet=true/false instead of facet.sort=true/false). Wrong context makes the code more confusing.
Argh, the dangers of search and replace...
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-781) Change facet.sort from boolean to string
and specify sort method explicitely
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lars Kotthoff updated SOLR-781:
-------------------------------
Attachment: SOLR-781.patch
I've taken a look at the non-overrequesting stuff -- we also need to consider the legacy case (i.e. true/false instead of sort/lex). Attaching patch which addresses this and replaces some string constants which escaped me before with the constants from FacetParams.
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley resolved SOLR-781.
-------------------------------
Resolution: Fixed
Committed - thanks Lars!
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654195#action_12654195 ]
Lars Kotthoff commented on SOLR-781:
------------------------------------
Thanks Yonik! On the topic of issues which have been around for a long time... do you have some time to take a look at SOLR-540 as well ;)
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654161#action_12654161 ]
Yonik Seeley commented on SOLR-781:
-----------------------------------
Thank you for your persistence Lars, I'll try and take a look at this soon.
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Erik Hatcher reassigned SOLR-781:
---------------------------------
Assignee: Erik Hatcher
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Attachments: SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654213#action_12654213 ]
Yonik Seeley commented on SOLR-781:
-----------------------------------
Lars, I already committed some code to normalize on the new facet.sort values so we don't need to check for both new and legacy everywhere.
Also, you didn't miss those string constants - I removed those two cases since they were being used for the wrong variable (facet=true/false instead of facet.sort=true/false). Wrong context makes the code more confusing.
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654176#action_12654176 ]
Yonik Seeley commented on SOLR-781:
-----------------------------------
I've also turned off over-requesting (increasing face.limit on shards) when facet.sort=lex
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-781) Change facet.sort from boolean to string
and specify sort method explicitely
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lars Kotthoff updated SOLR-781:
-------------------------------
Attachment: SOLR-781.patch
Attaching new patch which addresses the issues raised by Hoss Man.
* added legacy tests for facet.sort=true|false parameters and <boolean name="facet.sort"> configuration directives
* added deprecation warning when <boolean name="facet.sort"> is found in solrconfig
* replaced hardcoded "count", "lex", "true", and "false" with constants in FacetParams
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-781) Change facet.sort from boolean to string
and specify sort method explicitely
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lars Kotthoff updated SOLR-781:
-------------------------------
Attachment: SOLR-781.patch
Attaching patch which makes the necessary changes.
This patch does not break backwards compatibility; the "strings" "true" and "false" passed in URLs are handled as before and SolrJ adds methods returning/taking strings instead of booleans while keeping (and deprecating) the old ones.
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Attachments: SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-781) Change facet.sort from boolean to string
and specify sort method explicitely
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lars Kotthoff updated SOLR-781:
-------------------------------
Attachment: SOLR-781.patch
Syncing patch with trunk
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch, SOLR-781.patch, SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-781) Change facet.sort from boolean to string
and specify sort method explicitely
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otis Gospodnetic updated SOLR-781:
----------------------------------
Fix Version/s: 1.4
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-781) Change facet.sort from boolean to
string and specify sort method explicitely
Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633848#action_12633848 ]
Hoss Man commented on SOLR-781:
-------------------------------
Note the comment i made in the thread after Lars opend this issue ... we need to make sure there's at least one test verifying that <bool name="facet.sort">true</bool> still works if people are using it as a default/appends/invariant in their configs.
also: a quick skim a the patch suggests all of the old tests were changed to use "count" and "lex" ... there should probably still be at least one or two using "true" and "false" to prove that the back-compat works.
lastly: an enum would probably make sense here rather then a lot of `sort.equals("count") || sort.equals("true")}` sprinkled throughout the code.
> Change facet.sort from boolean to string and specify sort method explicitely
> ----------------------------------------------------------------------------
>
> Key: SOLR-781
> URL: https://issues.apache.org/jira/browse/SOLR-781
> Project: Solr
> Issue Type: New Feature
> Affects Versions: 1.3
> Reporter: Lars Kotthoff
> Assignee: Erik Hatcher
> Fix For: 1.4
>
> Attachments: SOLR-781.patch
>
>
> The facet.sort parameter is currently a boolean, which has some downsides as explained in http://www.nabble.com/facet.sort-parameter-td19570834.html
> Changing it to a string which explicitely states the sort method would address these issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.