[
https://issues.apache.org/jira/browse/SOLR-11265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ishan Chattopadhyaya updated SOLR-11265:
Description:
The maps used for set, inc, etc. operations are confusing the V2 handler.
Steps to reproduce:
{code}
$ curl http://localhost:8983/api/collections/demo/update -d '
[
{"id" : "book1",
"title_t" : "Snow Crash",// text field
"copies_i" : 5,
"cat_ss" : "Science Fiction" // multi-valued string field
}
]'
$ curl http://localhost:8983/api/collections/demo/update -d '
[
{"id" : "book1",
"author_s" : {"set":"Neal Stephenson"},
"copies_i" : {"inc":3},
"cat_ss" : {"add":"Cyberpunk"}
}
]'
{code}
This results in the following document:
{code}
{
"id":"book1",
"author_s.set":["Neal Stephenson"],
"copies_i.inc":[3],
"cat_ss.add":["Cyberpunk"],
"_version_":1576306836595802112,
"cat_ss.add_str":["Cyberpunk"],
"author_s.set_str":["Neal Stephenson"]}]
}
{code}
Example from Yonik's blog: http://yonik.com/solr/atomic-updates/
was:
The maps used for set, inc, etc. operations are confusing the V2 handler.
Steps to reproduce:
{code}
$ curl http://localhost:8983/solr/demo/update -d '
[
{"id" : "book1",
"title_t" : "Snow Crash",// text field
"copies_i" : 5,
"cat_ss" : "Science Fiction" // multi-valued string field
}
]'
$ curl http://localhost:8983/solr/demo/update -d '
[
{"id" : "book1",
"author_s" : {"set":"Neal Stephenson"},
"copies_i" : {"inc":3},
"cat_ss" : {"add":"Cyberpunk"}
}
]'
{code}
This results in the following document:
{code}
{
"id":"book1",
"author_s.set":["Neal Stephenson"],
"copies_i.inc":[3],
"cat_ss.add":["Cyberpunk"],
"_version_":1576306836595802112,
"cat_ss.add_str":["Cyberpunk"],
"author_s.set_str":["Neal Stephenson"]}]
}
{code}
> Atomic updates broken with V2 APIs
> --
>
> Key: SOLR-11265
> URL: https://issues.apache.org/jira/browse/SOLR-11265
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
>Reporter: Ishan Chattopadhyaya
>
> The maps used for set, inc, etc. operations are confusing the V2 handler.
> Steps to reproduce:
> {code}
> $ curl http://localhost:8983/api/collections/demo/update -d '
> [
> {"id" : "book1",
> "title_t" : "Snow Crash",// text field
> "copies_i" : 5,
> "cat_ss" : "Science Fiction" // multi-valued string field
> }
> ]'
> $ curl http://localhost:8983/api/collections/demo/update -d '
> [
> {"id" : "book1",
> "author_s" : {"set":"Neal Stephenson"},
> "copies_i" : {"inc":3},
> "cat_ss" : {"add":"Cyberpunk"}
> }
> ]'
> {code}
> This results in the following document:
> {code}
> {
> "id":"book1",
> "author_s.set":["Neal Stephenson"],
> "copies_i.inc":[3],
> "cat_ss.add":["Cyberpunk"],
> "_version_":1576306836595802112,
> "cat_ss.add_str":["Cyberpunk"],
> "author_s.set_str":["Neal Stephenson"]}]
> }
> {code}
> Example from Yonik's blog: http://yonik.com/solr/atomic-updates/
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org