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 "Yonik Seeley (JIRA)" <ji...@apache.org> on 2008/09/05 18:24:44 UTC
[jira] Created: (SOLR-755) facet.limit=-1 does not work in
distributed search
facet.limit=-1 does not work in distributed search
--------------------------------------------------
Key: SOLR-755
URL: https://issues.apache.org/jira/browse/SOLR-755
Project: Solr
Issue Type: Bug
Reporter: Yonik Seeley
Priority: Minor
If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628720#action_12628720 ]
Yonik Seeley commented on SOLR-755:
-----------------------------------
bq. Is there any reason why sorting is only turned on for limits > 0?
Back compatibility. At one point there was no facet.sort... before I added it, facet.limit read as follows:
{quote}
== facet.limit ==
This param indicates the maximum number of constraint counts that should be returned for the facet fields. If a non-negative value is specified, the constraints (ie: Terms) will be sorted by the facet count (descending) and only the top N terms will be returned with their counts. A negative value will result in every constraint being returned, in no partiular order.
{quote}
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628719#action_12628719 ]
Lars Kotthoff commented on SOLR-755:
------------------------------------
Ah, good point. I was testing with facet.mincount=1. Just disregard my patch.
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628725#action_12628725 ]
Lars Kotthoff commented on SOLR-755:
------------------------------------
bq. Back compatibility.
Right. What's going to break if this is changed? As far as I can see it's just code that relies on facet counts being returned in a particular order -- which, in this case, is no particular order ;)
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628728#action_12628728 ]
Lars Kotthoff commented on SOLR-755:
------------------------------------
bq. So... the only question left is if this should go in 1.3 or not.
Since it's clearly a bug, +1 for getting it into 1.3.
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628716#action_12628716 ]
Yonik Seeley commented on SOLR-755:
-----------------------------------
Whoops, you snuck in first... thanks Lars.
Although, I think your fix would cause an out-of-bounds exception?
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628722#action_12628722 ]
Yonik Seeley commented on SOLR-755:
-----------------------------------
So... the only question left is if this should go in 1.3 or not.
A client workaround is easy (specify a big number rather than -1), but it's probably not too much work to make another release candidate either.
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Lars Kotthoff (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lars Kotthoff updated SOLR-755:
-------------------------------
Attachment: SOLR-755.patch
I could swear that this was working for me a while back before I abandoned it because it was too slow. Ah well.
The culprit is the facet paginating code. The end is determined with
{code}
int end = Math.min(dff.offset + dff.limit, counts.length);
{code}
which is going to be -1 if the limit is set to -1, i.e. no facet counts will be returned.
The attached patch adds a check for a negative value for end and sets it to Integer.MAX_VALUE. This fixes the behaviour when sorting is turned on.
Is there any reason why sorting is only turned on for limits > 0? I think it would make sense to turn it on for -1 as well, or probably even for everything as it's not going to make a difference when no facet counts are requested.
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-755:
------------------------------
Attachment: SOLR-755.patch
patch attached
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley resolved SOLR-755.
-------------------------------
Resolution: Fixed
Fix Version/s: 1.3
ASL for this patch granted, and patch committed to trunk and 1.3 branch.
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
> Fix For: 1.3
>
> Attachments: SOLR-755.patch, SOLR-755.patch
>
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley reassigned SOLR-755:
---------------------------------
Assignee: Yonik Seeley
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Wojtek Piaseczny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628670#action_12628670 ]
Wojtek Piaseczny commented on SOLR-755:
---------------------------------------
Hi Yonik,
I submitted a patch for SOLR 748 (https://issues.apache.org/jira/browse/SOLR-748) a few days ago. I'm guessing that whatever changes you make for this bug will break my patch. Could you review my patch while you're making these changes?
Thanks,
Wojtek
Quoted from:
http://www.nabble.com/-jira--Created%3A-%28SOLR-755%29-facet.limit%3D-1-does-not-work-in-distributed-search-tp19334831p19334879.html
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-755) facet.limit=-1 does not work in
distributed search
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628704#action_12628704 ]
Yonik Seeley commented on SOLR-755:
-----------------------------------
I also just found and fixed a bug in TestDistributedSearch that failed to find some differences in responses... so now a test of facet.limit=-1&facet.sort=true now fails as it does in a manual test.
Note that one must add facet.sorted=true in conjunction with facet.limit=-1 since it defaults to unsorted (or sorted-by-term), and this is currently unsupported by distributed search.
> facet.limit=-1 does not work in distributed search
> --------------------------------------------------
>
> Key: SOLR-755
> URL: https://issues.apache.org/jira/browse/SOLR-755
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
>
> If you specify facet.limit=-1 in distributed mode, no facet results are returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.