update document segment (#948)

Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
Jyong 2023-08-22 15:19:09 +08:00 committed by GitHub
parent b185a70c21
commit aee15adf1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -973,7 +973,7 @@ class SegmentService:
db.session.add(segment)
db.session.commit()
# update segment vector index
VectorService.create_segment_vector(args['keywords'], segment, dataset)
VectorService.update_segment_vector(args['keywords'], segment, dataset)
except Exception as e:
logging.exception("update segment index failed")
segment.enabled = False