elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
68.56k stars 24.35k forks source link

TSDB index.routing_path setting improvement #82511

Open weizijun opened 2 years ago

weizijun commented 2 years ago

here are some improvement about TSDB index.routing_path settings:

  1. support custom routing search:

2.ignore object type check:

3.how to deal with ''.":

The reason why foo.bar is failed, is because of the Xcontent filter rule. May be it can be improved.

weizijun commented 2 years ago

hi, @imotov , @nik9000 , can you take a look the improvement?

elasticmachine commented 2 years ago

Pinging @elastic/es-analytics-geo (Team:Analytics)

nik9000 commented 2 years ago

hi, @imotov , @nik9000 , can you take a look the improvement?

Sorry for the delay getting back to you. I was pretty deeply in #82633. Which, ironically, reworks the handling routing generation.

I've thought a little about your first point. I was thinking that it should be possible to recognize sets of queries and use something like CoordinatorRewriteContext to lock to the correct shards. I'd sort of hoped users wouldn't need work without routing at all in tsdb. But I really haven't thought it all the way through.

For the second one - it sounds like the error message is just bad. I do like the paranoia of rejecting the matching object in the routing generation code. Maybe we can just improve the error message there?

About dots in names - yeah. I don't really want to change how x content filtering works. And I kind of want to be able to say that routing_path is just xcontent filtering that only accepts strings. I wonder if this is just something we can document?

elasticsearchmachine commented 4 months ago

Pinging @elastic/es-storage-engine (Team:StorageEngine)