We try to index the data according to a Routing Key (which refers to the ID of a tenant, from a multi-tenant application)
The data seems to be indexed as expected:
However, searching by this Routing field does not work correctly:
The same thing happens when we search using Nest 7.17.0 (.Net Core 6).
This is how we index data using Nest:
Can you help me please?
The routing parameter just ensures that documents with the same parameter will be indexed in the same shard, it does not act as a filter or namespace. As it is common to have a lot more routing values than shards, documents with numerous different routing values will share a shard. If you specify a routing parameter when searching, this will determine which shard that will be serached, but will not filter documents using the routing number, which means you could find other documents unless you also add a filter.
Document ids are also unique per shard, not routing id. If routiong id
12343434 happen to resolve to the same shard what you are seeing is expected.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.