You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gleaned from the discussion with @avelis in #20, during the bulk reindexing scenario only the following line:
data = {'delete' if delete else 'index': data}
would likely be better as:
data = {'delete' if delete else 'create': data}
Even better, for flexibility, probably having a safe default parameter into bulk_index() makes sense, like:
def bulk_index(cls, es=None, index_name='', queryset=None, create_only=False):
...
action = 'delete' if delete else ('create' if create_only else 'index')
data = {action: data}
This would prevent any possible overwriting of data in the new index during the reindex process. That said, this would never happen given the current structure and usage of this library. It becomes more relevant in a parallel index writing strategy discussed in #20.
Gleaned from the discussion with @avelis in #20, during the bulk reindexing scenario only the following line:
would likely be better as:
Even better, for flexibility, probably having a safe default parameter into
bulk_index()
makes sense, like:This would prevent any possible overwriting of data in the new index during the reindex process. That said, this would never happen given the current structure and usage of this library. It becomes more relevant in a parallel index writing strategy discussed in #20.
See ES bulk docs for more information.
The text was updated successfully, but these errors were encountered: