I am new to Elasticsearch. I have a mapping that has the following field:
{
"book": {
"book": {
"dynamic": "false",
"_source": {
"enabled": true
},
"_id": {
"path": "id"
},
"properties": {
"id": {
"type": "long",
"store": "yes",
"index": "not_analyzed",
"include_in_all": false
}
}
}
}
}
I can create an index and add documents. However, when I run the query, for example:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"ids": {
"type": "long",
"values" : [10]
}
}
}
}
}
It does not return anything (the index has a document with id = 10). I am confused by this link :
Can anyone enlighten me on this? What have I done wrong?
source
share