acts_as_solr returns all rows in the database when using the model as search query
- by chris Chan
In our application we're using acts_as_solr for search. Everything seems to be running smoothly except for the fact that using the model name as the search query returns every single row in the table.
For example, let's say we have a users table. We specify acts_as_solr in our model to search the fields first name, last name and handle acts_as_solr :fields = [:handle, :lname, :fname]. When you use "user" as the search term it returns every single user in the system, or every row in the database as a result.
Has anyone else run into this?