Ver Fonte

update dataset index struct (#1012)

Co-authored-by: jyong <jyong@dify.ai>
Jyong há 1 ano atrás
pai
commit
915e26527b
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      api/commands.py

+ 6 - 0
api/commands.py

@@ -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: