I'm trying to search in elasticsearch by query.
I'm want to get uuid = 002A13AC-93E6-4141-AA28-0A86F1B5E5C2 of device index.
GET device/_search?
{
"query": {
"match": {
"uuid" : "0aaa02A13AC-93E6-4141-AA28-0A86F1B5E5C2"
}
}
}
I want to get exactly the uuid. Only one letter difference is not effective. match is wrong.
Any help on how to resolve this issue? Sorry for my english.
sorry. I'm just want to get uuid = 002A13AC-93E6-4141-AA28-0A86F1B5E5C2 in my query.
If use match, in the query uuid = 0aaa02A13AC-93E6-4141-AA28-0A86F1B5E5C2, the result will still return 002A13AC-93E6-4141-AA28-0A86F1B5E5C2.
This is due to how your field is mapped. If you have not specified any index template it may be using the default mapping. In that case try to query uuid.keyword instead using a term query as that is not analyzed.
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.