Skip to content

Commit

Permalink
[Unticketed] Fix issue where opportunities aren't loaded to search in…
Browse files Browse the repository at this point in the history
…dex (#3567)

## Summary

### Time to review: __1 mins__

## Changes proposed
Tell processor to allow the record even if attachments are missing

## Context for reviewers

https://www.elastic.co/guide/en/elasticsearch/reference/current/foreach-processor.html

ignore_missing is defaulted to False. This means if the record has no
attachments, it just drops it and moves on. This fix makes it not drop
it, and just allow it.

## Additional information
Set `ENABLE_OPPORTUNITY_ATTACHMENT_PIPELINE=false` in the local.env

Run `make db-seed-local` and `make populate-search-opportunities`,
without this fix, nothing ends up in the search index.
  • Loading branch information
chouinar authored Jan 17, 2025
1 parent dca1e2c commit abd1111
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/src/search/backend/load_opportunities_to_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def _create_multi_attachment_pipeline(self) -> None:
"field": "_ingest._value.data",
}
},
"ignore_missing": True,
}
}
],
Expand Down

0 comments on commit abd1111

Please sign in to comment.