Преглед изворни кода

fix SQL slow query (#2043)

Co-authored-by: jyong <jyong@dify.ai>
tags/0.4.7
Jyong пре 1 година
родитељ
комит
add33cb5e6
No account linked to committer's email address
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1
    0
      api/core/tool/dataset_multi_retriever_tool.py

+ 1
- 0
api/core/tool/dataset_multi_retriever_tool.py Прегледај датотеку

document_context_list = [] document_context_list = []
index_node_ids = [document.metadata['doc_id'] for document in all_documents] index_node_ids = [document.metadata['doc_id'] for document in all_documents]
segments = DocumentSegment.query.filter( segments = DocumentSegment.query.filter(
DocumentSegment.dataset_id.in_(self.dataset_ids),
DocumentSegment.completed_at.isnot(None), DocumentSegment.completed_at.isnot(None),
DocumentSegment.status == 'completed', DocumentSegment.status == 'completed',
DocumentSegment.enabled == True, DocumentSegment.enabled == True,

Loading…
Откажи
Сачувај