Skip to content

Commit

Permalink
Skip empty fields
Browse files Browse the repository at this point in the history
To avoid the rror with the response: `"Could not read document, no document?"`
  • Loading branch information
olaughter committed Jan 26, 2024
1 parent 07ed516 commit cfd679a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index/vespa_.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ def populate_vespa(
to_process: dict[SchemaName, list] = defaultdict(list)

for schema, doc_id, fields in document_generator:
if not fields:
_LOGGER.critical(f"No fields for {doc_id}, of schema {schema}: {fields}")
continue
to_process[schema].append(
{
"id": doc_id,
Expand Down

0 comments on commit cfd679a

Please sign in to comment.