-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ability to pass in version argument to ElasticsearchTypeMixin.bulk_index method #20
Comments
Sorry, but I don't understand the use case for this? Can you elaborate? (Apologies for the late reply!) |
@jaddison Specifying a version allows for the flexibility to sync to potentially more than one endpoint with different mappings. The goal is to reduce boilerplate needed facilitate such a feature. |
@avelis I still don't understand the feature - but feel free to submit a PR demonstrating the feature and its use case. The PR wouldn't need to be 'complete' or fleshed out, but enough to demonstrate your intentions. Hopefully it wouldn't take more than a few minutes to put it together. If it makes sense (ie we can agree on a path forward) then it can be fleshed out more. As you can tell, I'm hesitant to add anything that increases complexity or falls out of the 'natural' scope for the project. If it is indeed within scope and is (or could be?) a common usage, then by all means I would merge as long as it had appropriate docs and tests. |
@jaddison I can see what I can do. To better illustrate where I am coming from I am linking a blog post that highlights their similar approach to re-indexing with zero downtime. This is what is driving the inspiration in this ticket. ES almost always requires a re-index if a mapping change removes any fields in a given document. This proves challenging if your index is large and can impact a user experience if down. The article above essentially suggested a parallel syncing strategy. The DSE library provides the structure for However, I do understand that it moves out of the territory of "simple". Thanks again for making this library. |
Ok, so I'll Even though DSE supports alias-based 'zero' downtime (indexing all data to a new index while the old one is running, then switching the alias to the new index name), there are still problems.
You see the ability to write a single Model's queryset in parallel to two separate indexes (types, maybe) (through parameter-versioned I think parameter-versioning In the long run, I think maybe a better approach is to use a 'router' paradigm:
In a complex project migration scenario:
I think between the blog article you linked and your descriptions, this covers it? |
@jaddison Looks pretty thorough to me. I really appreciate you taking the time to digest the article and hear out my scenario. Not many libraries in the Django+ES space are tackling the project migration lifecycle for Python+ES. With that said I realize this is not a small undertaking. I have greatly benefited from DSE for it's simplicity and continued upkeep. Thanks so much! |
You're welcome, although I'll admit time doesn't always allow for timely responsiveness. It's kind of a tough problem to solve in such a generic fashion - migration processes are usually quite specific to the platform/app/system. So while what is suggested above could be implemented, it's a big investment of time. I'm not certain of how much it would be used. If you want to take a stab at a revamp to support this, I'd be game to include it, particularly if it was backward compatible. |
The idea is to pass in a version argument in order to alter the results of
get_document
,get_es
, & possiblyget_type_name
. The best way I see this working out is to add the argument with default set toNone
.Adding such an enhancement would allow anyone to facilitate an ES transition/migration as they needed it.
The text was updated successfully, but these errors were encountered: