Search for a a list of phrases in Elasticsearch

Hi,
I was looking for a solution that I can search for a list of phrases. for example consider this list: ["foo", "bar", "the baz"]
if a give this search words as a search query in the Elasticsearch query, it will separate the words like this: ["foo", "bar ", "the", "baz"] (for example in multi_match query)
but I want to search for the "the baz" phrase and do not need results with only "the"
Is there any solution?

Thanks in advance

There's a phrase option in the multmatch query.

Is that what you're looking for?

Thanks for your response.
Actually I want to have such query:
query: "foo bar \"the baz\""
in a multi_match query such that foo, bar, the baz acts like an phrase separately.
In other word I want to retrieve documents that have these 3 phrases in some specific fields.
The phrase option you mentioned makes the whole query one phrase and this is not I want.

Would a simple query string query work in that case?

Otherwise, you can build a bool query with multiple should clauses. Each one would be a phrase query.

Nice. I will try your suggestions.
Thanks a lot