How to set up 'allow_custom_routing' for data streams?


How do I create a stream with "allow_custom_routing": true? I cannot find any documention on it.
I have specified:

"mappings": {
    "dynamic": "true",
    "_routing": {
      "required": true

but it has no effect.
GET _index_template/... API
always shows:

        "data_stream" : {
          "hidden" : false,
          "allow_custom_routing" : false

I am re-indexing data_content index into stream and it says:
"type" : "illegal_argument_exception",
"reason" : "index request targeting data stream [dac-test-icube] specifies a custom routing but the [allow_custom_routing] setting was not enabled in the data stream's template."


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.