I'm using Prefix query and here is the query
{
"query": {
"prefix": {
"name": {
"value": "asp"
}
}
}
}
So I'm assuming that I need to get the documents based on the name property starting with "asp"
{
"_index" : "testindex",
"_type" : "doc",
"_id" : "123",
"_score" : 1.0,
"_source" : {
"name" : "ASPIRIN"
}
},
{
"_index" : "testindex",
"_type" : "doc",
"_id" : "223",
"_score" : 1.0,
"_source" : {
"name" : "AMPHETAMINE ASPARTAT"
}
}
}