2.0_take3 branch
_all field if searchable is specifiedload: falsemulti_searchClean up
Searchkick modulesearchkick_create_index, clean_indices, searchkick_import, searchkick_debugIndexing improvements
reindex to be called on relationpartial_reindex to reindex(:method_name)Remove old options / methods
select with select_v2merge_mappings option with default_mappingsquery and json search options (use body instead)include option (use includes instead)personalize option (use boost_where instead)partial option (use operator instead)ReindexJobsearchable (or provided in the query)searchkick_index to search_indexsearchkick_index_options (replace with mappings proc)misspellings: {below: 5}debug option to search methodreindex methodwhere syntax with underscores - _gt, _lt, etcReindexBatchJob to support bulk reindexid field in search_databody and conflicting options, like whereComments welcome!
All of your proposed changes look good! I have a suggestion, but I don't know if it's warranted.
When reindexing associations, e.g. with a callback:
after_commit :reindex_associations
def reindex_associations
users.each { |u| u.reindex }
whatever.each { |w| w.reindex }
end
the above gets repetitive with the each call, especially if you have models with a lot of associations that need reindexing. Would it be possible/make sense to add the reindex method to the collection? So instead it would be:
after_commit :reindex associations
def reindex_associations
users.reindex
whatever.reindex
end
The collection's reindex method would implicitly call each itself to reindex individual items, allowing cleaner code for searchkick clients. Does this make sense to implement?
Just out of curiosity, what would replace facets? If nothing, is there a particular reason for them getting dropped?
EDIT: I didn't realize how old my version was and I just read the documentation on moving to aggs. Thanks for that.