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
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5ca8493a-1781-494b-88b3-0b5fbed3b7f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2