mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: skip processing when field value is empty in search document conditions
This commit is contained in:
parent
6e87ceffce
commit
c735aaa427
|
|
@ -120,6 +120,9 @@ class BaseSearchDocumentNode(ISearchDocumentStepNode):
|
|||
field_value = self.workflow_manage.generate_prompt(condition['value'])
|
||||
compare_type = condition['compare']
|
||||
|
||||
if field_value:
|
||||
continue
|
||||
|
||||
# 构建查询条件
|
||||
if compare_type == 'not_contain':
|
||||
# 反向查询:找出包含该标签的文档,然后排除
|
||||
|
|
@ -156,6 +159,9 @@ class BaseSearchDocumentNode(ISearchDocumentStepNode):
|
|||
field_value = self.workflow_manage.generate_prompt(condition['value'])
|
||||
compare_type = condition['compare']
|
||||
|
||||
if field_value:
|
||||
continue
|
||||
|
||||
if compare_type == 'not_contain':
|
||||
# 反向查询:找出包含该标签的文档,然后用全集减去
|
||||
exclude_docs = set(QuerySet(DocumentTag).filter(
|
||||
|
|
|
|||
Loading…
Reference in New Issue