Is it possible to search for "foo", "bar", "baz" s...
# community-help
b
Is it possible to search for "foo", "bar", "baz" separately in one query?
j
Could you elaborate on what you mean "search separately"?
b
For example if searching for "foo" returns doc1,doc2 and "bar" returns doc2, doc4 the combined search should return their union (doc1, doc2, doc4).
They are part of the same collection. Multi search seems to be what I need, will it return duplicates (doc2 two times)?
j
Yeah it will return duplicate results, it just a way to wrap multiple search requests in a single HTTP call
So you'd have to de-duplicate and aggregate on the client side
b
Great, thanks!
👍 1