Adding a Index & Filter not working


(Matias) #1

Hi guys, im trying this

curl -XPOST localhost:9200/_aliases -d '{
    "actions": [{
        "add": {
            "index": "common",
            "alias": "alias_test",
            "filter": {"term": {"customer_id": 1}},
            "routing": "alias_test"
        }
    }]
}'

And getting this result

$ curl -XGET 'localhost:9200/common/_alias/*?pretty'

{
  "common" : {
    "aliases" : {
      "alias_test" : {
        "index_routing" : "alias_test",
        "search_routing" : "alias_test"
      },
      "dolores98141" : {
        "filter" : {
          "term" : {
            "orgId" : "dolores98141"
          }
        },
        "index_routing" : "dolores98141",
        "search_routing" : "dolores98141"
      }
    }
  }
}

Where dolores98141 was a previously created index (with a filter).

The issue here: I'm not seeing any filter associated with the new alias_test index. Is this a bug or am I using the API in the wrong way?

Thans in advance


(Matias) #2

Apparently this bug was already reported

Closing


(system) #3