[
https://issues.apache.org/jira/browse/SOLR-6168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14035781#comment-14035781
]
Joel Bernstein commented on SOLR-6168:
--------------------------------------
Hi Umesh,
Thanks for reporting the bug and providing the test case. It looks like the
test is failing because the collapsing is choosing document 5 rather then
document 6 as the group head. So it's not a sorting issue, it's a collapsing
issue. Because you are collapsing on the test_tl field, which is a tie for
documents 5 and 6 you'll need to use a function query as the collapse criteria
to break the tie.
Something like this should do the trick:
{code}
params.add("cf", "sum(field(test_tl),field(id))")
params.add("fq", "{!collapse field=group_s max=$cf)}");
{code}
> CollapsingQParserPlugin ranks incorrectly when 3 or more sort params are used
> -----------------------------------------------------------------------------
>
> Key: SOLR-6168
> URL: https://issues.apache.org/jira/browse/SOLR-6168
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.7.1, 4.8.1
> Reporter: Umesh Prasad
> Assignee: Joel Bernstein
> Attachments: SOLR-6168-broken-multi-sort-test-case.patch
>
>
> CollapsingQParser Plugin ranks documents incorrectly when more than 2 sort
> fields are used.
> I have attached a test case, which demonstrates the broken behavior when 3
> sort fields are used.
> The failing test case patch is against Lucene/Solr 4.8.1 revision number
> 1603061
> PS : SOLR-5408 fixed the issue with sorting only for two sort fields, by
> allowing one to specify max/min=<field-name>. However that requires 2nd sort
> field to be a numeric field. It will not work with string field or function
> query sort.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]