# Alias and close - Bug?

**URL:** <https://discuss.elastic.co/t/alias-and-close-bug/9990>\
**Category:** Elasticsearch\
**Created:** [December 7, 2012, 4:26pm UTC](https://discuss.elastic.co/t/alias-and-close-bug/9990 "2012-12-07T16:26:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [December 7, 2012, 4:26pm UTC](https://discuss.elastic.co/t/alias-and-close-bug/9990/1 "2012-12-07T16:26:30Z")

</div>

Hi,

we noticed the following behavior, maybe someone could confirm if this a  
bug (I would consider it a bug) or a feature:  
I have two indices and add an alias to them. Searching on the alias works  
fine. The moment I close one index it aint working anymore, exception is  
{"error":"ClusterBlockException[blocked by: [FORBIDDEN/4/index  
closed];]","status":403}  
Shouldnt closed indices not be considered when retrieving concrete indices  
matching an alias?

Thanks!  
Andrej

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [December 7, 2012, 4:52pm UTC](https://discuss.elastic.co/t/alias-and-close-bug/9990/2 "2012-12-07T16:52:19Z")

</div>

Searching an alias is practically the same as specifying both indices on  
URL during the search. So, if one of the indices is closed, Elasticsearch  
cannot perform the search, so it generates the error. You will have to  
remove the index from the alias manually before closing the index.

On Friday, December 7, 2012 11:26:30 AM UTC-5, Andrej Rosenheinrich wrote:

> Hi,
> 
> we noticed the following behavior, maybe someone could confirm if this a  
> bug (I would consider it a bug) or a feature:  
> I have two indices and add an alias to them. Searching on the alias works  
> fine. The moment I close one index it aint working anymore, exception is  
> {"error":"ClusterBlockException[blocked by: [FORBIDDEN/4/index  
> closed];]","status":403}  
> Shouldnt closed indices not be considered when retrieving concrete indices  
> matching an alias?
> 
> Thanks!  
> Andrej

--

---

<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, 3:00am UTC](https://discuss.elastic.co/t/alias-and-close-bug/9990/3 "2017-07-06T03:00:50Z")

</div>


