Skip to content

Commit

Permalink
fix dataset_id and index_node_id idx missed in document_segments tabl… (
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong authored Aug 27, 2024
1 parent 7b7576a commit 35431bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/core/indexing_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ def _process_keyword_index(flask_app, dataset_id, document_id, documents):
document_ids = [document.metadata['doc_id'] for document in documents]
db.session.query(DocumentSegment).filter(
DocumentSegment.document_id == document_id,
DocumentSegment.dataset_id == dataset_id,
DocumentSegment.index_node_id.in_(document_ids),
DocumentSegment.status == "indexing"
).update({
Expand Down Expand Up @@ -751,6 +752,7 @@ def _process_chunk(self, flask_app, index_processor, chunk_documents, dataset, d
document_ids = [document.metadata['doc_id'] for document in chunk_documents]
db.session.query(DocumentSegment).filter(
DocumentSegment.document_id == dataset_document.id,
DocumentSegment.dataset_id == dataset.id,
DocumentSegment.index_node_id.in_(document_ids),
DocumentSegment.status == "indexing"
).update({
Expand Down

0 comments on commit 35431bc

Please sign in to comment.