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
Description
Currently the starting point of any search is a Rails model, which is not conducive to things like shared indexes or multiple indexes.
In the current state of this gem a model may have multiple indexes but only the primary index will be searchable in the way we want it to Model.search ... and there is no convenient way to search others (while receiving ActiveRecord instances).
In addition it's hard to keep track of what models share an index, making it inconvenient (and currently impossible) to rebuild a shared index safely.
I propose we create a new type of resource in a rails app called an index:
defined in files in app/indexes/*_index.rb
pointing to models similar to Rails associations searches :books, class_name: 'Ebook' do ... end
searchable and capable of returning polymorphic results (AnimalIndex.search returns Cats and Dogs)
Description
Currently the starting point of any search is a Rails model, which is not conducive to things like shared indexes or multiple indexes.
In the current state of this gem a model may have multiple indexes but only the primary index will be searchable in the way we want it to
Model.search ...
and there is no convenient way to search others (while receiving ActiveRecord instances).In addition it's hard to keep track of what models share an index, making it inconvenient (and currently impossible) to rebuild a shared index safely.
I propose we create a new type of resource in a rails app called an index:
app/indexes/*_index.rb
searches :books, class_name: 'Ebook' do ... end
AnimalIndex.search
returnsCat
s andDog
s)Basic example
P. S.: I am not suggesting removing the current
meilisearch
block syntax, just adding another way to search.The text was updated successfully, but these errors were encountered: