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

Fix version_type in popularity update #1111

Open
MatMoore opened this issue Dec 18, 2017 · 0 comments
Open

Fix version_type in popularity update #1111

MatMoore opened this issue Dec 18, 2017 · 0 comments
Labels

Comments

@MatMoore
Copy link
Contributor

From: https://trello.com/c/xiYv8sH9/38-fix-versiontype-in-popularity-update

We set '_version_type' => 'external_gte' on every document when updating the popularity data: https://github.com/alphagov/rummager/blob/master/lib/govuk_index/popularity_worker.rb#L23

This is correct for the govuk which uses external versioning, but incorrect for mainstream, government and detailed, which use internal versioning (the default).

This doesn't cause any race conditions in those indices because we don't use optimistic locking when updating the non-govuk indices anyway.

But it is confusing, because it implies that we use versioning in non-govuk indices when we don't. This has slowed down our investigation of search duplicates because we weren't sure if the mix of versioning systems could cause duplicates of documents. (It can't, as far as we know, but we wasted time investigating it.)

More on ES versioning: https://www.elastic.co/blog/elasticsearch-versioning-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant