I had some trouble trying to query the id_ field
The following query works:
GET my_index/my_type/_search
{
"query" : {
"match":{
"_id": "ABC_my_content1"
}
}
}
But what if I want to search for all the document that has the _id start with ABC?
This does not work:
GET my_indxe/my_type/_search
{
"query" :{
"query_string" : {
"default_field" : "_id",
"query" : "ABC*"
}
}
}
I got the error
Can only use prefix queries on keyword and text fields - not on [_id] which is of type [_id]
Any suggestions?