update dataset index struct (#1012)

Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
Jyong 2023-08-25 15:52:33 +08:00 committed by GitHub
parent 2d604d9330
commit 915e26527b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,6 +351,12 @@ def create_qdrant_indexes():
embeddings=embeddings
)
if index:
index_struct = {
"type": 'qdrant',
"vector_store": {"class_prefix": dataset.index_struct_dict['vector_store']['class_prefix']}
}
dataset.index_struct = json.dumps(index_struct)
db.session.commit()
index.create_qdrant_dataset(dataset)
create_count += 1
else: