Ruby on Rails
Monday, August 19, 2013
Hello. I have a search form with two search engines (sphinx, elasticsearch), I need to add filters by parameters (name, cost, direction, country). Something like this http://funkyimg.com/i/Cdyk.png. The problem is, I don't know how to pass all this queries from the form to the one search query so that I can handle filters inside the search engine (f.e. filters are working if search query passed to one search form).
Not sure if I explained it well.
Here's an example:
I enter "lorem" in the main search field, then in the "Name" field I enter "Australia" all this goes to the one search query (it is in params[:query]), so result is - only first tour should be displayed.
Again, it works when there is one field.
tours_controller: http://paste2.org/CZXHdMO1
Thanks.
-- Not sure if I explained it well.
Here's an example:
I enter "lorem" in the main search field, then in the "Name" field I enter "Australia" all this goes to the one search query (it is in params[:query]), so result is - only first tour should be displayed.
Again, it works when there is one field.
tours_controller: http://paste2.org/CZXHdMO1
Thanks.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/55030fc9-4d3e-4998-9cf0-896ecca54c3b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment