The _id field is not analyzed so you can only retrieve a document if the id matches exactly.
If you have an id field within your source with the same value as _id, the story can be different, but it depends on how that id field is mapped. Can you share your mapping?
thanks mr val you response my question,
i dont use mapping , but you're idea to create new field with same value as _id is good idea
but i must update my data one by one.
im new using elasticsearch but i read any article if you want to use mapping you must
reset your data and input again , it is right ??
but if there is no way again,
cant helped i must trying use mapping
This will create a new id field inside your source having the same value as the _id field. However, if your _ids are of the form 001_employee and you're willing to look for all documents whose id ends with employee, you might want to change your ids to employee_001 instead as it is easier to search for prefixes than suffixes.
Does your index contain different data types? Why do you encode employee within your 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.