Hybrid search is broken when using cross-references on a class with multi-tenancy enabled.
The queries work when using with_bm25, or with_near_vector.
with_bm25
(client.query.get(
class_name="Page",
properties=["""
page_no
content
book {
... on Book {
name
}
}"""])
.with_bm25(
query="hole",
properties=["content"],
)
.with_tenant("tenant1")
).do()
-> {'data': {'Get': {'Page': [{'book': [{'name': 'The Lord of the Rings'}],
'content': 'In a hole in the ground there lived a hobbit.',
'page_no': 1}]}}}
with_near_vector
(client.query.get(
class_name="Page",
properties=["""
page_no
content
book {
... on Book {
name
}
}"""])
.with_near_vector({
"vector":[0.1, 0.2, 0.3]
})
.with_tenant("tenant1")
).do()
-> {'data': {'Get': {'Page': [{'book': [{'name': 'The Lord of the Rings'}],
'content': 'In a hole in the ground there lived a hobbit.',
'page_no': 1}]}}}
with_hybrid
(client.query.get(
class_name="Page",
properties=["""
page_no
content
book {
... on Book {
name
}
}"""])
.with_hybrid(
query="hole",
properties=["content"],
vector=[0.1, 0.2, 0.3],
alpha=1.0,
)
.with_tenant("tenant1")
).do()
-> {'data': {'Get': {'Page': None}},
'errors': [{'locations': [{'column': 6, 'line': 1}],
'message': 'hybrid search post-processing: resolve cross-refs: build reference cache: build request cache: fetch job list: index "book": class Book has multi-tenancy enabled, but request was without tenant',
'path': ['Get', 'Page']}]}
Reproducible case / gist: multitenant-hybrid.ipynb ยท GitHub