Hi,

I created the following alias/routing ("users" is the index name, "user" is 
the type name):

{
  "users": {
    "aliases": {
      "acme": {
        "filter": {
          "term": {
            "tenant": "acme"
          }
        },
        "index_routing": "acme",
        "search_routing": "acme"
      }
    }
  }
}


And everything works OK:

curl -XGET 'http://localhost:9200/acme/user/_count'
 
{"count":8, "_shards": {"total":5,"successful":5,"failed":0}}


But if the alias name has a '-' char:

{
  "users": {
    "aliases": {
      "foo-bar": {
        "filter": {
          "term": {
            "tenant": "foo-bar"
          }
        },
        "index_routing": "foo-bar",
        "search_routing": "foo-bar"
      }
    }
  }
}


The routing is not working:

curl -XGET 'http://localhost:9200/foo-bar/user/_count'
 
{"count":0, "_shards": {"total":5,"successful":5,"failed":0}}


curl -XGET 'http://localhost:9200/users/user/_count?q=tenant:"foo-bar";'

{"count":15, "_shards": {"total":5, "successful":5, "failed":0}}


Any clues?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/98476ebe-b426-418e-9597-c821de56cc6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to