[ 
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.

Reply via email to