# Partial results when querying an alias

**URL:** <https://discuss.elastic.co/t/partial-results-when-querying-an-alias/14990>\
**Category:** Elasticsearch\
**Created:** [December 22, 2013, 7:28am UTC](https://discuss.elastic.co/t/partial-results-when-querying-an-alias/14990 "2013-12-22T07:28:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yarin](https://avatars.discourse-cdn.com/v4/letter/y/6a8cbe/32.png) [@yarin](https://discuss.elastic.co/u/yarin)\
**Post date:** [December 22, 2013, 7:28am UTC](https://discuss.elastic.co/t/partial-results-when-querying-an-alias/14990/1 "2013-12-22T07:28:44Z")

</div>

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](mailto: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](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](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:59am UTC](https://discuss.elastic.co/t/partial-results-when-querying-an-alias/14990/2 "2017-07-06T01:59:43Z")

</div>


