Hi,
I'm trying to search for drug names in my datastore,
{
"index": "drugs",
"body": {
"size": 20,
"query": {
"bool": {
"must": [
{
"term": {
"RouteOfAdministration": "OR"
}
},
{
"multi_match": {
"query": "gabapentin",
"type": "phrase_prefix",
"fields": [
"ProductName",
"DrugName",
"GenericName"
],
"minimum_should_match": 1
}
}
]
}
}
}
}
However this returns drugs that don't belong in the search results. Is there a way I can tweak this to search from the beginning of the fields? As I suspect I'm not doing it correctly.
Thanks!