-
Notifications
You must be signed in to change notification settings - Fork 47
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
Index-first search #341
Labels
enhancement
New feature or request
Milestone
Comments
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: