mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-01 18:29:32 +00:00
Raise exception if filter supplied for query (#338)
This commit is contained in:
parent
0ad22d5038
commit
f0fe16774f
@ -141,6 +141,8 @@ class FAISSDocumentStore(SQLDocumentStore):
|
||||
def query_by_embedding(
|
||||
self, query_emb: np.array, filters: Optional[dict] = None, top_k: int = 10, index: Optional[str] = None
|
||||
) -> List[Document]:
|
||||
if filters:
|
||||
raise Exception("Query filters are not implemented for the FAISSDocumentStore.")
|
||||
if not self.faiss_index:
|
||||
raise Exception("No index exists. Use 'update_embeddings()` to create an index.")
|
||||
query_emb = query_emb.reshape(1, -1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user