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
Search lifecycle #1891
Search lifecycle #1891
Conversation
udata/search/__init__.py
Outdated
except: | ||
log.exception('Unable to index %s "%s"', | ||
model.__name__, str(obj.id)) | ||
adapter.save(using=es.client, index=es.index_name, refresh=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a performance hog? elastic/elasticsearch-js#117 (comment)
udata/search/__init__.py
Outdated
except: | ||
log.exception('Unable to index %s "%s"', | ||
model.__name__, str(obj.id)) | ||
adapter.delete(using=es.client, index=es.index_name, refresh=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here (performance)
udata/search/__init__.py
Outdated
log.info('Unindexing %s (%s)', model.__name__, obj.id) | ||
try: | ||
adapter = adapter_class.from_model(obj) | ||
adapter.delete(using=es.client, index=es.index_name, refresh=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
This PR:
This fixes organizations still being suggested after deletion.
NB: As there is a lot of moves in this PR (pytest migration and split), reviewing by commit might be easier