Partial results when querying an alias

In an effort to create multi-tenant architecture for my project. I've
created an elasticsearch cluster with an index 'tenant'

"tenant" : { "some_type" : { "_routing" : { "required" : true, "path" :
"tenantId" }

The tenant index has 2 shards, no replicas.

I've also created aliases -

"tenant" : {
"aliases" : {
"tenant_1" : {
"index_routing" : "1",
"search_routing" : "1"
},
"tenant_2" : {
"index_routing" : "2",
"search_routing" : "2"
},
"tenant_3" : {
"index_routing" : "3",
"search_routing" : "3"
},
"tenant_4" : {
"index_routing" : "4",
"search_routing" : "4"

}

During testing we noticed that querying tenant_2 yielded 80 records while
there were far more records with tenantId=2 in the index 'tenant' - about
300 records.

And here's the strangest part - when I created a new alias 'tenant_test'
correlating to the alias 'tenant_2' querying it worked perfectly and so
does querying the problematic 'tenant_2'

I've tried to reproduce the problem but without any success.

We're really concerned about this, while we really want to use aliases in
production to increase our scaling capabilities.
Anyone has any clues about what can cause this ?

Thanks in advance,
Yarin.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/842209b5-0a1e-42ac-a7dc-b08db200110e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.