feat(kb_index): When the knowledge base is in the high-quality indexing mode, economical index will not be created.

pull/20868/head
Dongyu Li 12 months ago
parent 85859b6723
commit e246fd48ee

@ -76,6 +76,7 @@ class ParagraphIndexProcessor(BaseIndexProcessor):
if dataset.indexing_technique == "high_quality":
vector = Vector(dataset)
vector.create(documents)
with_keywords = False
if with_keywords:
keywords_list = kwargs.get("keywords_list")
keyword = Keyword(dataset)
@ -91,6 +92,7 @@ class ParagraphIndexProcessor(BaseIndexProcessor):
vector.delete_by_ids(node_ids)
else:
vector.delete()
with_keywords = False
if with_keywords:
keyword = Keyword(dataset)
if node_ids:

@ -97,7 +97,7 @@ class VectorService:
vector = Vector(dataset=dataset)
vector.delete_by_ids([segment.index_node_id])
vector.add_texts([document], duplicate_check=True)
else:
# update keyword index
keyword = Keyword(dataset)
keyword.delete_by_ids([segment.index_node_id])

Loading…
Cancel
Save