MongoDb Atlas search with queryString

Hi,

Is it possible to set multiple default path in queryString? like this.
{
“$search”: {
“index”: , // optional, defaults to “default”
“queryString”: {
“defaultPath”: [“”,“”]
“query”: “(: () AND|OR ()) AND|OR ()”
}
}
}

queryString supports only a single defaultPath, for any pieces of the query string that do not explicitly specify a field/path to use. In order to use queryString across multiple default fields, you can nest multiple queryString clauses within a compound.should, each having a unique path.

1 Like