Match based on array input?

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Opensearch 2.5

Describe the issue:
I have setup a cluster at my company to match fuzzy input business information to our database.
The input data looks like this:

names: ["Acme Corp, Inc", "acme inc", "The Acme corporation"]
addresses: ["123 Main street", "123 main st."]

As you can see, all the records are of the same business, but we receive different variation of the name and/or the address.

I am setting up the query like this:

    query = {
      "_source": "business",  
      "size": 5,
      "fields": [
      "query": {
        "bool": {
          "should": [
              "match": {
                "names": {"query": names, "boost":10, "fuzziness": "AUTO"},
              "match": {
                "addresses": {"query": addresses, "boost":1, "fuzziness": "AUTO"},

       "filter": {
              "geo_distance": {
                 "distance": f"{RADIUS}km",
                   "coordinates": {
                      "lat": lat,
                      "lon": lon

However, running this query fails with the following error:

RequestError(400, 'x_content_parse_exception', '[match] unknown token [START_ARRAY] after [query]')

How can I make Opensearch accept the input as an array?


Relevant Logs or Screenshots:

@manugarri query is a keyword and I think your match is incorrect. You should use curly brackets with a query keyword.

Could you share a sample of your document and index mappings?

What is the expected result of this query?

hey Pablo, i wrote pseudocode, but I believe i used curly brackets…

Regarding examples, i shared one input example, and the index docs look similar:

fields: {
"names": ["business name 1", "business name 2"]
"addresses":["Address 1", "Address 2"]