We’re testing Weaviate v4 for our vector database and have two collections (classes) set up. Our users often ask questions where we don’t know which collection contains the relevant answer, so we need to query multiple collections simultaneously.
So far, the best solution I’ve found is using this GraphQL query:
{
Get {
Features (
hybrid: {
query: "some query..."
alpha: 0.5
}
limit: 5
) {
product
channel
_additional { score }
}
Banks (
hybrid: {
query: "some query..."
alpha: 0.5
}
limit: 5
) {
bank_name
aBU
_additional { score }
}
}
}
This works, but hardcoding each collection isn’t scalable as more collections are added.
My question:
Is there a way to dynamically query multiple collections in v4 without listing each one manually? Only thing we saw is the Explore method, which is not supported anymore as far as we see.
Thanks in advance!