浏览代码

update bm25 search properties (#1758)

Co-authored-by: Blade <zhangxiaobin@unixyz.cn>
tags/0.3.34
Qiwen Tong 1年前
父节点
当前提交
c09184fd94
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      api/core/vector_store/vector/weaviate.py

+ 1
- 1
api/core/vector_store/vector/weaviate.py 查看文件

query_obj = query_obj.with_where(kwargs.get("where_filter")) query_obj = query_obj.with_where(kwargs.get("where_filter"))
if kwargs.get("additional"): if kwargs.get("additional"):
query_obj = query_obj.with_additional(kwargs.get("additional")) query_obj = query_obj.with_additional(kwargs.get("additional"))
properties = ['text', 'dataset_id', 'doc_hash', 'doc_id', 'document_id']
properties = ['text']
result = query_obj.with_bm25(query=query, properties=properties).with_limit(k).do() result = query_obj.with_bm25(query=query, properties=properties).with_limit(k).do()
if "errors" in result: if "errors" in result:
raise ValueError(f"Error during query: {result['errors']}") raise ValueError(f"Error during query: {result['errors']}")

正在加载...
取消
保存