I want to find a document with a name that contains 'Bob' and has a location that is in either 'paducah' or 'smyrna'.
Here's what I have now:
query: {
bool: {
must: [
{ match: { name: 'bob' } },
{ match: { location: ['paducah', 'smyrna'] } }
],
},
},
I know the problem is in the location array, because if i change it to a single element with no array the query works just fine.
This is the closest answer i could find.
It didn't work, i receive the following error:
[term] malformed query, expected [END_OBJECT] but found [FIELD_NAME]