Skip to content

Commit

Permalink
Update knowledge.py (dataelement#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaojin3616 committed Nov 1, 2023
2 parents 5d4b77c + 3576389 commit e52782c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/backend/bisheng/api/v1/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,6 @@ def delete_knowledge_file(*,
res = vectore_client.col.delete(f"pk in {[p['pk'] for p in pk]}")
logger.info(f'act=delete_vector file_id={file_id} res={res}')

esvectore_client = decide_vectorstores(collection_name, 'ElasticKeywordsSearch', embeddings)
if isinstance(esvectore_client, ElasticKeywordsSearch):
esvectore_client.client.delete_by_query(index=collection_name,query={"match":{"metadata.file_id":file_id}})
logger.info(f'act=delete_es file_id={file_id} res={res}')

# minio
minio_client.MinioClient().delete_minio(str(knowledge_file.id))
# elastic
Expand Down

0 comments on commit e52782c

Please sign in to comment.