When I'm using prefix query it getting the documents where input string in middle also?

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"
}
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.