-
Notifications
You must be signed in to change notification settings - Fork 760
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
new option to ignore search_import #1632
Comments
Hi @memsenpai, can you share more about why you want to skip it? |
@ankane |
Hi @memsenpai, I don't really understand how it makes things worse, but you can call reindex on individual records to skip it. Searchkick.callbacks(:bulk) do
Product.where(...).map(&:reindex)
end |
@ankane & @davidwparker do we have any update regarding this? This is causing a lot of queries that are not required in partial reindexing. |
After defining the search_import, every time I reindex, it is automatically used and there is no way for me to skip it, even when my scope only has 1-2 records.
Currently, I can also solve the problem by writing additional logic checks in search_import, but I think it would be great if you could support it.
I hope we have an option that can limit the minimum number of records to use search_import, or we can skip it.
.reindex(search_import: false)
.reindex(search_import_when: 10)
The text was updated successfully, but these errors were encountered: