You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2016/07/15 01:34:20 UTC
[jira] [Commented] (SOLR-9309) SolrCloud RTG with multiple "id"
params has inconsistent behavior if only 0 or 1 ids are returned
[ https://issues.apache.org/jira/browse/SOLR-9309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15378723#comment-15378723 ]
Hoss Man commented on SOLR-9309:
--------------------------------
Example of problem...
{{bin/solr -e cloud -noprompt}}
If you have 2 docs that exist in a cloud setup, you get a "doclist" structure in the response, regardless of which param syntax you use to request both of them (this is consistent with single node solr) ...
{noformat}
$ curl 'http://localhost:8983/solr/gettingstarted/get?ids=xxx,yyy'
{
"response":{"numFound":2,"start":0,"docs":[
{
"id":"yyy",
"aaa_i":-459637688,
"_version_":1539876677329354752},
{
"id":"xxx",
"aaa_i":1532757419,
"_version_":1539876677341937664}]
}}
$ curl 'http://localhost:8983/solr/gettingstarted/get?id=xxx&id=yyy'
{
"response":{"numFound":2,"start":0,"docs":[
{
"id":"yyy",
"aaa_i":-459637688,
"_version_":1539876677329354752},
{
"id":"xxx",
"aaa_i":1532757419,
"_version_":1539876677341937664}]
}}
{noformat}
if 1 of the ids requested do not exist in the collection, SolrCloud's RTG response structure becomes inconsistent depending on which param syntax you used -- using multiple {{id}} params behaves as if only one doc was requested...
{noformat}
$ curl 'http://localhost:8983/solr/gettingstarted/get?ids=xxx,bogus1'
{
"response":{"numFound":1,"start":0,"docs":[
{
"id":"xxx",
"aaa_i":1532757419,
"_version_":1539876677341937664}]
}}
$ curl 'http://localhost:8983/solr/gettingstarted/get?ids=bogus2,bogus1'
{
"response":{"numFound":0,"start":0,"docs":[]
}}
$ curl 'http://localhost:8983/solr/gettingstarted/get?id=xxx&id=bogus1'
{
"doc":
{
"id":"xxx",
"aaa_i":1532757419,
"_version_":1539876677341937664}}
$ curl 'http://localhost:8983/solr/gettingstarted/get?id=bogus2&id=bogus1'
{
"doc":null}
{noformat}
> SolrCloud RTG with multiple "id" params has inconsistent behavior if only 0 or 1 ids are returned
> -------------------------------------------------------------------------------------------------
>
> Key: SOLR-9309
> URL: https://issues.apache.org/jira/browse/SOLR-9309
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Hoss Man
>
> * RTG uses a diff reqponse format depending on whether a single id is requested or multiple ids are requested.
> * there are 2 ways to request multiple ids:
> *# multiple {{id}} params
> *# comma seperated ids in one (or more) {{ids}} param(s)
> But in cloud mode, asking for multiple ids using the first method can incorrectly return the "single" doc response structure if 0 or 1 docs are returned (ie: because the other doc(s) don't exist in the index or were deleted).
> This inconsistency does not seem to exist in single node solr RTG
> (Example to follow in comment)
--
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