Facets aren't working

Thank you so much Karel, you were right I didn't pass options categories.

I added in my controller

def search
options = {
categories: params[:categories]
}
params[:query].present?
@companies = Company.search(params[:query],
options).page(params[:page]).per(10).results
end

Now everything work perfectly.

Thanks again :slight_smile:

On Thursday, June 12, 2014 12:17:43 AM UTC-6, Karel Minařík wrote:

So, are you actually passing the c URL parameter to the search method?
Notice the code: if options[:categories] in your search method.

But you don't seem to be passing just params[:query] in your controller: Company.search
params[:query]

Karel

What I mean by "facets aren't working", that I can't to filter my results.

But when I try filter results, nothing is happening. Line in the log
are identical, although rails log shows me that params "c" and "query" are
passing through. Url also reflecting that params submitted. That where I am
stuck.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/26770952-630d-4f2f-95a9-05e758a4bdb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.