Im experimenting with Amplify and Appsync graphql implementation using AWSAppSyncClient, and was trying to implement a rudimentary search on multiple fields, using 'and' operator for multiple key-words.
EG; Fetch any entries where specified fields contain "red" and "car"... such as, title could have car, and description could have the word red in it, and vice versa.
This requires either nested and/or filters, or im guessing using the multiMatch filter. I am unable to find any docs or examples for such a search.
So, my question is, is what I'm trying to do possible with amplify appsync client? And is there any example(or documentation) on how @searchable directive with multiMatch search works?
There is a multi_match
example at the bottom of this page.
"body":{
"from":0,
"size":50,
"query" : {
"multi_match" : {
"query" : "$context.arguments.state",
"fields" : ["city", "state"]
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With