I have a business key id in the fields of my type, which a long data type. And here is the mapping of the corresponding type(part of the mapping):
"npms_id": {
"type": "long"
},
Here is the severe problem I came up with: The npms_id I send to the es server is different from the one in the result JSON returned by Elasticsearch server. For example, I have a query like this:
GET /index/type/_search
{
"query" :{
"term" : {
"npms_id": 91447292341973010
}
}
}
I will not get any result. But if I change the search npms_id, like this:
GET /index/type/_search
{
"query" :{
"term" : {
"npms_id": 91447292341973001
}
}
}
I will get the result of npms_id: 91447292341973010. So I doubt that the true value stored in the shards is 91447292341973001, but what confuses me is why 91447292341973010 is returned or just displayed. In order to get the details of this search, I have done it by enabling the profile function. And the result is gisted here. In addition, the version of my elasticsearch is 5.2.0. Hopefully, this is not a bug problem of this version. Any suggestions are really appreciated here because I'm really stuck on this problem. Thank you guys in advance!