You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Julien MASSENET (JIRA)" <ji...@apache.org> on 2015/12/18 13:38:46 UTC
[jira] [Updated] (SOLR-8441) maxScore is sometimes missing from
distributed grouped responses
[ https://issues.apache.org/jira/browse/SOLR-8441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julien MASSENET updated SOLR-8441:
----------------------------------
Flags: Patch
Description:
This issue occurs when using the grouping feature in distributed mode and sorting by score.
Each group's {{docList}} in the response is supposed to contain a {{maxScore}} entry that hold the maximum score for that group. Using the current releases, it sometimes happens that this piece of information is not included:
{code}
{
"responseHeader": {
"status": 0,
"QTime": 42,
"params": {
"sort": "score desc",
"fl": "id,score",
"q": "_text_:\"72\"",
"group.limit": "2",
"group.field": "group2",
"group.sort": "score desc",
"group": "true",
"wt": "json",
"fq": "group2:72 OR group2:45"
}
},
"grouped": {
"group2": {
"matches": 567,
"groups": [
{
"groupValue": 72,
"doclist": {
"numFound": 562,
"start": 0,
"maxScore": 2.0378063,
"docs": [
{
"id": "29!26551",
"score": 2.0378063
},
{
"id": "78!11462",
"score": 2.0298104
}
]
}
},
{
"groupValue": 45,
"doclist": {
"numFound": 5,
"start": 0,
"docs": [
{
"id": "72!8569",
"score": 1.8988966
},
{
"id": "72!14075",
"score": 1.5191172
}
]
}
}
]
}
}
}
{code}
Looking into the issue, it comes from the fact that if a shard does not contain a document from that group, trying to merge its {{maxScore}} with real {{maxScore}} entries from other shards is invalid (it results in NaN).
I'm attaching a patch containing a fix.
was:
This issue occurs when using the grouping feature in distributed mode and sorting by score.
Each group's {{docList}} in the response is supposed to contain a {{maxScore}} entry that hold the maximum score for that group. Using the current releases, it sometimes happens that this piece of information is not included:
{code}
> maxScore is sometimes missing from distributed grouped responses
> ----------------------------------------------------------------
>
> Key: SOLR-8441
> URL: https://issues.apache.org/jira/browse/SOLR-8441
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 5.3
> Reporter: Julien MASSENET
> Priority: Minor
>
> This issue occurs when using the grouping feature in distributed mode and sorting by score.
> Each group's {{docList}} in the response is supposed to contain a {{maxScore}} entry that hold the maximum score for that group. Using the current releases, it sometimes happens that this piece of information is not included:
> {code}
> {
> "responseHeader": {
> "status": 0,
> "QTime": 42,
> "params": {
> "sort": "score desc",
> "fl": "id,score",
> "q": "_text_:\"72\"",
> "group.limit": "2",
> "group.field": "group2",
> "group.sort": "score desc",
> "group": "true",
> "wt": "json",
> "fq": "group2:72 OR group2:45"
> }
> },
> "grouped": {
> "group2": {
> "matches": 567,
> "groups": [
> {
> "groupValue": 72,
> "doclist": {
> "numFound": 562,
> "start": 0,
> "maxScore": 2.0378063,
> "docs": [
> {
> "id": "29!26551",
> "score": 2.0378063
> },
> {
> "id": "78!11462",
> "score": 2.0298104
> }
> ]
> }
> },
> {
> "groupValue": 45,
> "doclist": {
> "numFound": 5,
> "start": 0,
> "docs": [
> {
> "id": "72!8569",
> "score": 1.8988966
> },
> {
> "id": "72!14075",
> "score": 1.5191172
> }
> ]
> }
> }
> ]
> }
> }
> }
> {code}
> Looking into the issue, it comes from the fact that if a shard does not contain a document from that group, trying to merge its {{maxScore}} with real {{maxScore}} entries from other shards is invalid (it results in NaN).
> I'm attaching a patch containing a fix.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org