Skip to content

Explicitly create ES index #2023

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

Merged
merged 2 commits into from
May 23, 2017
Merged

Explicitly create ES index #2023

merged 2 commits into from
May 23, 2017

Conversation

di
Copy link
Member

@di di commented May 22, 2017

This fixes #1712 by explicitly creating the new Elasticsearch index when reindexing.

It seems like the behavior has changed since #1473: If we don't explicitly create the index, the default mapping that we get doesn't respect the keyword type for properties like classifier, which results in them being considered text instead, which results in them being tokenized and not matching exactly to their respective values.

To prevent the index_already_exists_exception in #1473 from returning, we can now tell create to block until all the shards become active. This should prevent the original (hypothesized) race condition between create, and parallel_bulk attempting to auto-create the index. (It's hard to say whether this really will prevent it as I still haven't been able to reproduce it in dev, but a stale index is better than one that doesn't work at all...)

@dstufft dstufft merged commit d0f629f into pypi:master May 23, 2017
@dstufft dstufft deleted the create-search-index branch May 23, 2017 09:59
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

Successfully merging this pull request may close these issues.

Search by topic broken ?
2 participants