How to search text field for list of "terms" / "keywords"

Hi ES Community,
We have a set of text-documents indexed, and their primary field is an analyzed version of their text (stored in a text field). We want to exact or partial match any of a long list of keywords in the text.
The keyword list is easily a few hundred terms, or keywords.
Previously, we've combined match phrase queries in a boolean clause, and gotten around the large query by changing the maxClauseCount.
It would look like this:

    { "must" : [ 
     "should" : { "match_phrase" : .... },
     "should" : { "match_phrase" : .... },
    ] // etc

Now we've switched to Elastic Cloud and they don't allow changing that setting. I'm trying to figure out if its possible to write this query in a different way.

So ideally something like

    "match_keywords" : ["a", "b", "c" ]

I cannot find anything to support this operation. It seems a quite trivial operation since the term vector should contain all the information needed to do this.
Is this even possible? How would I go about writing this?
Ideally the query would also return what term was matched, but that is an add-on luxury.


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