Use Vespa Doc ID directly instead of from fields (#399)

This commit is contained in:
Yuhong Sun
2023-09-04 17:24:31 -07:00
committed by GitHub
parent f7cc7190fe
commit d593818996

View File

@ -104,9 +104,7 @@ def _get_vespa_chunk_ids_by_document_id(
while True: while True:
results = requests.get(SEARCH_ENDPOINT, params=params).json() results = requests.get(SEARCH_ENDPOINT, params=params).json()
hits = results["root"].get("children", []) hits = results["root"].get("children", [])
doc_chunk_ids.extend( doc_chunk_ids.extend([hit["id"].split("::")[1] for hit in hits])
[hit.get("fields", {}).get("documentid").split("::")[1] for hit in hits]
)
params["offset"] += hits_per_page # type: ignore params["offset"] += hits_per_page # type: ignore
if len(hits) < hits_per_page: if len(hits) < hits_per_page: