lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Khludnev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12096) Inconsistent response format in subquery transform
Date Tue, 27 Mar 2018 13:57:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16415656#comment-16415656
] 

Mikhail Khludnev commented on SOLR-12096:
-----------------------------------------

Contributing test [^SOLR-12096.testsubquery.patch], please incorporate into the patch. 

> Inconsistent response format in subquery transform
> --------------------------------------------------
>
>                 Key: SOLR-12096
>                 URL: https://issues.apache.org/jira/browse/SOLR-12096
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Munendra S N
>            Assignee: Ishan Chattopadhyaya
>            Priority: Major
>         Attachments: SOLR-12096.patch, SOLR-12096.patch, SOLR-12096.patch, SOLR-12096.patch,
SOLR-12096.testsubquery.patch
>
>
> Solr version - 6.6.2
> The response of subquery transform is inconsistent with multi-shard compared to single-shard
> h1. Single Shard collection
> Request 
> {code:java}
> localhost:8983/solr/k_test/search?sort=score desc,uniqueId desc&q.op=AND&wt=json&q={!parent
which=parent_field:true score=max}({!edismax v=$origQuery})&facet=false&fl=uniqueId&fl=score&fl=_children_:[subquery]&fl=uniqueId&origQuery=false&qf=parent_field&_children_.fl=uniqueId&_children_.fl=score&_children_.rows=3&spellcheck=false&_children_.q={!edismax
qf=parentId v=$row.uniqueId}&rows=1
> {code}
> Response for above request
> {code:json}
> {
>     "responseHeader": {
>         "zkConnected": true,
>         "status": 0,
>         "QTime": 0,
>         "params": {
>             "fl": [
>                 "uniqueId",
>                 "score",
>                 "_children_:[subquery]",
>                 "uniqueId"
>             ],
>             "origQuery": "false",
>             "q.op": "AND",
>             "_children_.rows": "3",
>             "sort": "score desc,uniqueId desc",
>             "rows": "1",
>             "q": "{!parent which=parent_field:true score=max}({!edismax v=$origQuery})",
>             "qf": "parent_field",
>             "spellcheck": "false",
>             "_children_.q": "{!edismax qf=parentId v=$row.uniqueId}",
>             "_children_.fl": [
>                 "uniqueId",
>                 "score"
>             ],
>             "wt": "json",
>             "facet": "false"
>         }
>     },
>     "response": {
>         "numFound": 1,
>         "start": 0,
>         "maxScore": 0.5,
>         "docs": [
>             {
>                 "uniqueId": "10001677",
>                 "score": 0.5,
>                 "_children_": {
>                     "numFound": 9,
>                     "start": 0,
>                     "docs": [
>                         {
>                             "uniqueId": "100016771",
>                             "score": 0.5
>                         },
>                         {
>                             "uniqueId": "100016772",
>                             "score": 0.5
>                         },
>                         {
>                             "uniqueId": "100016773",
>                             "score": 0.5
>                         }
>                     ]
>                 }
>             }
>         ]
>     }
> }
> {code}
> Here, *_children_* suquery response is as expected (Based on documentation)
> h1. Multi Shard collection(2)
> Request
> {code:java}
> localhost:8983/solr/k_test_2/search?sort=score desc,uniqueId desc&q.op=AND&wt=json&q={!parent
which=parent_field:true score=max}({!edismax v=$origQuery})&facet=false&fl=uniqueId&fl=score&fl=_children_:[subquery]&fl=uniqueId&origQuery=false&qf=parent_field&_children_.fl=uniqueId&_children_.fl=score&_children_.rows=3&spellcheck=false&_children_.q={!edismax
qf=parentId v=$row.uniqueId}&rows=1
> {code}
> Response
> {code:json}
> {
>     "responseHeader": {
>         "zkConnected": true,
>         "status": 0,
>         "QTime": 11,
>         "params": {
>             "fl": [
>                 "uniqueId",
>                 "score",
>                 "_children_:[subquery]",
>                 "uniqueId"
>             ],
>             "origQuery": "false",
>             "q.op": "AND",
>             "_children_.rows": "3",
>             "sort": "score desc,uniqueId desc",
>             "rows": "1",
>             "q": "{!parent which=parent_field:true score=max}({!edismax v=$origQuery})",
>             "qf": "parent_field",
>             "spellcheck": "false",
>             "_children_.q": "{!edismax qf=parentId v=$row.uniqueId}",
>             "_children_.fl": [
>                 "uniqueId",
>                 "score"
>             ],
>             "wt": "json",
>             "facet": "false"
>         }
>     },
>     "response": {
>         "numFound": 5,
>         "start": 0,
>         "maxScore": 0.5,
>         "docs": [
>             {
>                 "uniqueId": "10006197",
>                 "_children_": [
>                     {
>                         "uniqueId": "100061971",
>                         "score": 0.5
>                     },
>                     {
>                         "uniqueId": "100061972",
>                         "score": 0.5
>                     },
>                     {
>                         "uniqueId": "100061973",
>                         "score": 0.5
>                     }
>                 ],
>                 "score": 0.5
>             }
>         ]
>     }
> }
> {code}
> As you can see, *_children_* subquery response is a list instead of Map



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message