Aliases by bulk requests

(Harish Ved) #1

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 at the latest
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
To view this discussion on the web visit
For more options, visit

(system) #2