Add where filter in weaviate similarity search with score (#9978)

- Description: Add where filter in weaviate similarity search with score
  - Issue: #9853 
  - Dependencies: -
  - Tag maintainer: -
  - Twitter handle: -
This commit is contained in:
Arpan Pokharel 2023-09-02 04:54:19 +05:45 committed by GitHub
parent 30239b3025
commit f8bca156d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,6 +343,8 @@ class Weaviate(VectorStore):
if kwargs.get("search_distance"):
content["certainty"] = kwargs.get("search_distance")
query_obj = self._client.query.get(self._index_name, self._query_attrs)
if kwargs.get("where_filter"):
query_obj = query_obj.with_where(kwargs.get("where_filter"))
embedded_query = self._embedding.embed_query(query)
if not self._by_text: