I wouldn’t call it semantic sugar, more like a different compact format. The 
compact format also avoids duplicate keys, which are legal in JSON but hard to 
create in some systems.
The XML command format is working fine.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On May 26, 2023, at 10:47 AM, Chris Hostetter <hossman_luc...@fucit.org> 
> wrote:
> 
> 
> : Hmm. That doesn’t seem consistent with the format change added in 
> : SOLR-5980, where each ID can have a _route_ attribute.
> : 
> : { "id":"ID" , "_route_":"route”}
> 
> I think you may be getting confused between the syntactic sugar of sending 
> a single delete command as the entire JSON payload + the "syntactic sugar" 
> of sending multiple IDs in a single delete command vs the full JSON 
> update command syntax,
> 
> this...
> 
> { "delete":"x" }
> 
> ...is just syntactic sugar for...
> 
> { 
>  "delete":{"id":"x"}
> }
> 
> 
> While this...
> 
> 
> { "delete":["a","b","c"] }
> 
> ...is just syntactic sugar for...
> 
> { 
>  "delete":{"id":"a"},
>  "delete":{"id":"b"},
>  "delete":{"id":"c"}
> }
> 
> But when using the full syntax multiple commands can be included in a 
> single request, and each command can include options (like _version_ and 
> _route_)...
> 
> { 
>  "delete": { "id":"x", "_route_":"a" }, 
>  "delete": { "id":"y", "_route_":"b" },
>  "add": { ... } 
> }
> 
> (I'm guessing the docs would make more sense if the note about including 
> "_version_" with deletes was moved up by the example of the full command 
> syntax, and the examples of the "simple delete-by-id" syntactic sugar were 
> moved below that ... if anyone wnats to submit a patch)
> 
> 
> -Hoss
> http://www.lucidworks.com/

Reply via email to