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

Support passing an explicit index_name for search indexing #5239

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

ericholscher
Copy link
Member

This is a bit of a hack, but it will work for now.

This is a bit of a hack, but it will work for now.
@safwanrahman
Copy link
Member

I think we can move to the previous approach where we could pass the index_name in the update method by overriding the default DocType class of django-elasticsearch-dsl

@ericholscher
Copy link
Member Author

Yea, that just leads to a lot of code that we're copy/pasting into our project, which feels more brittle.

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't find the hack too hacky. Doesn't look to bad, actually.

@safwanrahman
Copy link
Member

safwanrahman commented Feb 6, 2019

It will provide the wrong index name to the tasks that are running during the doc_obj.update(queryset.iterator()). I think its better to avoide the hacky way if we can do from our end.

Yea, that just leads to a lot of code that we're copy/pasting into our project, which feels more brittle.

I am hoping to implement it to the django-elasticsearch-dsl package as well. I think that time we do not need this much of code. But till then, I think its good to have that code in our project.

@ericholscher
Copy link
Member Author

It will provide the wrong index name to the tasks that are running during the doc_obj.update(queryset.iterator()). I think its better to avoide the hacky way if we can do from our end.

I tested it and it seems to work fine.

@ericholscher ericholscher merged commit a6dbefc into master Feb 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-reindexing branch February 6, 2019 17:42
@ericholscher
Copy link
Member Author

Going to merge this so we can ship it, but we should come back to this.

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.

3 participants