Skip to content

Commit 84dc468

Browse files
fix(elasticsearch): use create op for SKIP policy to enable proper skip counting
1 parent fc8b5c1 commit 84dc468

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • integrations/elasticsearch/src/haystack_integrations/document_stores/elasticsearch

integrations/elasticsearch/src/haystack_integrations/document_stores/elasticsearch/document_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ async def write_documents_async(
704704
self._handle_sparse_embedding(doc_dict, doc.id)
705705

706706
action = {
707-
"_op_type": "create" if policy == DuplicatePolicy.FAIL else "index",
707+
"_op_type": "index" if policy == DuplicatePolicy.OVERWRITE else "create",
708708
"_id": doc.id,
709709
"_source": doc_dict,
710710
}

0 commit comments

Comments
 (0)