Prefix inside a multi_match query


(Sunil Khullar) #1

Hi

I am new to ES. And this is my first week.
I have a requirement to search with prefix inside this multi_match query. I am stuck Any any help will be appreciated.

{
"query": {
"multi_match": {
"query":
"searchword" ,
"type": "cross_fields" ,
"operator" : "or" ,
"fields" : ["field1", "field2", "field3", "field4"]
}
}
}


(Christoph) #2

Hi,

I think you are looking for the phrase_prefix type: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#type-phrase


(system) #3

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