-
Notifications
You must be signed in to change notification settings - Fork 2.1k
configurable datastore FTS indexes #8530
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
Conversation
This looks good @wardi IIRC there needs to be a similar PR for backporting to 2.11 (and 2.10?) with the default value |
@amercader yes, I will create those separately. I also want to have a cli command to update the FTS indexes based on the configuration option so users have an easy way to reclaim space on an existing installation. |
@wardi is the CLI command meant to be in this PR or can I merge it? |
bumped back to draft so I can finish the CLI |
@amercader ready for review again, will work on 2.11 backport |
|
||
for i, resid in enumerate(get_all_resources_ids_in_datastore(), 1): | ||
print(f'\r{resid} [{i}/{len(resource_ids)}] ...', end='') | ||
logic.get_action('datastore_create')( |
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.
We don't need to do anything now but it feels a bit uneasy to call datastore_create
without params in order to trigger the indexes updating, as this will also do anything that a datastore_create
call does. Maybe now that is just the indexes but who knows if something else is added in the future. A specific datastore_update_indexes
call would be safer but again, we can improve this in the future.
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.
I was also uneasy with this, except that creating indexes is part of what datastore_create
does automatically, so I don't know how you would move that functionality to a separate call without breaking the API.
Fixes #5847
Proposed fixes:
Disable automatic FTS indexes of text fields in the datastore through a new configuration option
Features: