Skip to content

Commit e0f1ca9

Browse files
committed
quick nit
1 parent 737c611 commit e0f1ca9

File tree

1 file changed

+4
-6
lines changed
  • backend/onyx/document_index/vespa

1 file changed

+4
-6
lines changed

backend/onyx/document_index/vespa/index.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,20 +571,20 @@ def _update_single_chunk(
571571
update_dict: dict[str, dict] = {"fields": {}}
572572

573573
if fields.boost is not None:
574-
update_dict["fields"]["boost"] = {"assign": fields.boost}
574+
update_dict["fields"][BOOST] = {"assign": fields.boost}
575575

576576
if fields.document_sets is not None:
577-
update_dict["fields"]["document_sets"] = {
577+
update_dict["fields"][DOCUMENT_SETS] = {
578578
"assign": {document_set: 1 for document_set in fields.document_sets}
579579
}
580580

581581
if fields.access is not None:
582-
update_dict["fields"]["access_control_list"] = {
582+
update_dict["fields"][ACCESS_CONTROL_LIST] = {
583583
"assign": {acl_entry: 1 for acl_entry in fields.access.to_acl()}
584584
}
585585

586586
if fields.hidden is not None:
587-
update_dict["fields"]["hidden"] = {"assign": fields.hidden}
587+
update_dict["fields"][HIDDEN] = {"assign": fields.hidden}
588588

589589
if not update_dict["fields"]:
590590
logger.error("Update request received but nothing to update.")
@@ -603,8 +603,6 @@ def _update_single_chunk(
603603
)
604604
resp.raise_for_status()
605605
except httpx.HTTPStatusError as e:
606-
# Optional: inspect the error message for "Rejecting execution due to overload"
607-
# or check e.response.status_code (e.g., 429 or 503).
608606
logger.error(
609607
f"Failed to update doc chunk {doc_chunk_id} (doc_id={doc_id}). "
610608
f"Details: {e.response.text}"

0 commit comments

Comments
 (0)