Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the elastic_load task to delete a bill (including version number) before indexing #140

Closed
aih opened this issue Jan 29, 2021 · 1 comment
Assignees

Comments

@aih
Copy link
Collaborator

aih commented Jan 29, 2021

We don't want duplicate bills indexed. So before indexing a bill (e.g. '116hr200ih'), we delete the bill from the index -- if it already exists -- and then index it. We want to make sure that this affects only the same version, since we want to index various versions of the same bill (e.g. '116hr200ih', '116hr200eh', '116hr200enr', etc.)

@aih
Copy link
Collaborator Author

aih commented Jan 31, 2021

Solved this (I hope) by adding an id to the document during indexing that corresponds to the bill number. Then Elasticsearch will automatically update the document index instead of creating a duplicate.
(fc3464 did this in common/elastic_load.py)

@aih aih closed this as completed Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants