# Aliases by bulk requests

**URL:** <https://discuss.elastic.co/t/aliases-by-bulk-requests/18113>\
**Category:** Elasticsearch\
**Created:** [June 15, 2014, 6:23am UTC](https://discuss.elastic.co/t/aliases-by-bulk-requests/18113 "2014-06-15T06:23:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish\_Ved](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@Harish\_Ved](https://discuss.elastic.co/u/Harish_Ved)\
**Post date:** [June 15, 2014, 6:23am UTC](https://discuss.elastic.co/t/aliases-by-bulk-requests/18113/1 "2014-06-15T06:23:38Z")

</div>

I am trying to index some products via bulk requests. I am using  
elastic-search version 1.2.0 and am using python client from here  
[http://elasticsearch-py.readthedocs.org/en/latest/api.html](http://elasticsearch-py.readthedocs.org/en/latest/api.html) at the latest  
version.  
So, I am using helpers.bulk(es, actions) for bulk requests. On indexing  
individually by es.index(index, doc\_type, body) if i use an alias name in  
place of index, the alias (which was already created) is applied to that  
product (ie I can search by localhost:9200/alias/\_search).  
My problem is - on bulk indexing, if I define each action as {"\_index":  
alias, "\_type": "type", "\_id": "random", "\_source": body}, then the product  
is not listed in 'localhost:9200/alias/\_search' but is rather empty. I am  
sure the alias is defined and points to the proper index.

PS - After bulk indexing I can search by 'localhost:9200/index/\_search'  
even if I defined \_index = alias in action.  
My Question - How to add documents to a previously defined alias via bulk  
indexing (actions in the actions list may point to different alias)?

--  
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/5ca8493a-1781-494b-88b3-0b5fbed3b7f2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5ca8493a-1781-494b-88b3-0b5fbed3b7f2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:22am UTC](https://discuss.elastic.co/t/aliases-by-bulk-requests/18113/2 "2017-07-06T01:22:29Z")

</div>


