Elasticsearch, Query String, need match string
I suggest that you simply add an asterisk *
behind what the user is typing, like below, and that should achieve what you need:
{ query_string: { fields: ["name^10"], query: q + "*" }}