Join Slack
Powered by
Is it possible to search for "foo", "bar", "baz" s...
# community-help
b
bnfd
11/05/2021, 4:53 PM
Is it possible to search for "foo", "bar", "baz" separately in one query?
j
Jason Bosco
11/05/2021, 5:38 PM
Could you elaborate on what you mean "search separately"?
Jason Bosco
11/05/2021, 5:39 PM
May be multi search is what you're looking for:
https://typesense.org/docs/0.21.0/api/documents.html#federated-multi-search
b
bnfd
11/05/2021, 6:07 PM
For example if searching for "foo" returns doc1,doc2 and "bar" returns doc2, doc4 the combined search should return their union (doc1, doc2, doc4).
bnfd
11/05/2021, 6:14 PM
They are part of the same collection. Multi search seems to be what I need, will it return duplicates (doc2 two times)?
j
Jason Bosco
11/05/2021, 6:15 PM
Yeah it will return duplicate results, it just a way to wrap multiple search requests in a single HTTP call
Jason Bosco
11/05/2021, 6:15 PM
So you'd have to de-duplicate and aggregate on the client side
b
bnfd
11/05/2021, 6:16 PM
Great, thanks!
👍 1
4
Views
Open in Slack
Previous
Next