You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ishan Chattopadhyaya (JIRA)" <ji...@apache.org> on 2017/08/21 02:47:00 UTC

[jira] [Created] (SOLR-11265) Atomic updates broken with V2 APIs

Ishan Chattopadhyaya created SOLR-11265:
-------------------------------------------

             Summary: 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/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}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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