How can I assign auto-incremented number id to my every new document? I don't want to have that auto generated long non-readable id from elastic search.
I want elastic search to handle/assign numeric values to my document id at time of index. I don't want to manually handle auto incremented ids at time of indexing, neither I want to use log stash. Is there a way?
I don't think there is anything and actually there won't be probably anything that will be fast if you have to do a lookup for every single document you want to index.
Is there any reason you don't want to autogenerated id?
Reason is that its hard for support team to ask dev team delete particular document or range of documents based on id.
Document id is not readable, one can simply ask to delete documents from id > 20 and <40 but here it is not the case.
I don't know your use case so it's hard to give advices but if you have let say customer data where the document contains the document id and you have a timestamp (automatically generated with a painless script processor or better by your application), then it's easy to delete by query documents between 2 dates for a given customer id.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.