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": [
"names",
"id",
"addresses"
],
"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?
Configuration:
Relevant Logs or Screenshots: