Thanks! I tried including the shard key field in the atomic payload, but
still hit routing errors.Tried the following -

# alias + join_s + date in body
curl -X POST 'https://example.com/solr/my_content_alias/update?commit=true' \
 -H 'Content-Type: application/json' \
 --data-binary '[
  {"id":"DOC123","join_s":"DOC123","date":"2012-03-12T18:30:00Z",
   "fieldA":{"set":[1]}}
 ]'Error - 400 (distributed) "Unable to index docs with children… need
'_root_'" (we don’t use nested docs)
# collection + join_s in body (also tried {"set":"DOC123"})
curl -X POST 
'https://example.com/solr/my_content__TRA__2012-01-01/update?commit=true'
...Error - 400 "Unexpected type of routeKey: null"

Thanks,
Srilekhya

On Tue, Sep 9, 2025 at 12:42 PM mtn search <search...@gmail.com> wrote:

> Focusing on the first example - Assuming join_s is the
> create-collection.router.field
> field in the TRA def, you will want to include the field join_s and value
> as part of the atomic update payload.  After the TRA sorts by date, it will
> need this field to route to the correct shard.
>
> On Tue, Sep 9, 2025 at 8:52 AM Srilekhya Kalahasty <lekh...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > Atomic updates are failing for me with routing errors. Collection router
> > is compositeId with router.field=join_s.
> >
> > Below are examples of some of the calls I tried to make and the errors I
> > saw for them -
> >
> > # Doc: id=DOC123, join_s=DOC123, date=2012-03-12T18:30:00Z
> >
> > # Atomic update via alias, passing route + date:
> > curl -X POST '
> >
> https://example.com/solr/my_content_alias/update?commit=true&_route_=DOC123
> '
> > \
> >   -H 'Content-Type: application/json' \
> >   --data-binary '[
> >     {"id":"DOC123","date":"2012-03-12T18:30:00Z",
> >      "fieldA":{"set":[1]},
> >      "fieldB":{"set":["a","b"]}}
> >   ]'
> > Error - 400  "No value for :join_s. Unable to identify shard"
> >
> > # Atomic update via backing collection (no alias), with _route_ or
> > shard.keys:
> > curl -X POST '
> >
> https://example.com/solr/my_content__TRA__2012-01-01/update?commit=true&_route_=DOC123
> '
> > ...
> > Error - 400  "Unexpected type of routeKey: null"
> >
> > # Atomic via leader core + distrib=false:
> > curl -X POST '
> >
> https://example.com/solr/my_content__TRA__2012-01-01_shard2_replica_t4/update?commit=true&distrib=false
> '
> > ...
> > Error - 400  "Unexpected type of routeKey: null"
> >
> > Are there known limitations or required parameters for atomic updates
> > through a TRA when the collection uses router.field=join_s? What’s the
> > recommended way to provide the shard key in this setup? Should _route_
> > work, is there another param/header I am missing? Any pointers
> appreciated!
> >
> > Thanks!
> >
> > Srilekhya Kalahasty
>

Reply via email to