Well, Dmitry. Turns out keys in JSON _should be_ but not ought to be
unique.
You can think about streaming writer or reader in any rational programming
language.
If we talk about DOM style parsing we are not limited by a map, but also
can afford a bag or fabulous Solr's NamedList-ha!
I know what it looks like, but it is not significantly more shocking than
http GET with a body payload that's quite obvious in search.


On Fri, Oct 28, 2022 at 11:13 PM dmitri maziuk <dmitri.maz...@gmail.com>
wrote:

> The example in TFM is a JSON array that contains two "add" keys and two
> "delete" keys and so can't be generated in any rational programming
> language:
>
> '''
> url -X POST -H 'Content-Type: application/json'
> 'http://localhost:8983/solr/my_collection/update' --data-binary '
> {
>    "add": {
>      "doc": {
>        "id": "DOC1",
>        "my_field": 2.3,
>        "my_multivalued_field": [ "aaa", "bbb" ]
>      }
>    },
>    "add": {
>      "commitWithin": 5000,
>      "overwrite": false,
>      "doc": {
>        "f1": "v1",
>        "f1": "v2"
>      }
>    },
>
>    "commit": {},
>    "optimize": { "waitSearcher":false },
>
>    "delete": { "id":"ID" },
>    "delete": { "query":"QUERY" }
> }'
> '''
>
> Is that a documentation bug and the outer level is actually meant to be
> a list (of what?), or does it really expect the above string?
>
> Anybody?
>
> Dima
>
>

-- 
Sincerely yours
Mikhail Khludnev

Reply via email to