Skip to content

Commit

Permalink
Assign id rather than calisphere-id as _id when creating OpenSe…
Browse files Browse the repository at this point in the history
…arch record
  • Loading branch information
barbarahui committed Jan 19, 2024
1 parent 8783daf commit b93bc87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion record_indexer/add_page_to_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def build_bulk_request_body(records: list, index: str):
# https://opensearch.org/docs/1.2/opensearch/rest-api/document-apis/bulk/
body = ""
for record in records:
doc_id = record.get("calisphere-id")
doc_id = record.get("id")

action = {"create": {"_index": index, "_id": doc_id}}

Expand Down

0 comments on commit b93bc87

Please sign in to comment.