Search Multiple Categories

23 views
Skip to first unread message

zachariah ngonyani

unread,
Aug 30, 2013, 9:25:58 PM8/30/13
to rubyonra...@googlegroups.com
I have a rails app that lists different law firms. These law firms can be categorized by Practice Area and Location. Now i need to implement a search, where people can select from a select option a Location AND a Practice Area and find all Law Firms that are in that selected Location which also Practice in the selected Area, any idea?
Thanks

Emil S

unread,
Sep 2, 2013, 5:37:09 AM9/2/13
to rubyonra...@googlegroups.com
Just use the boolean operator "AND" in your search query. This should work both for simple SQL queries on your database and for queries on hosted search servers which ( thinking sphix , cloudsearch , etc ) . What have you tried so far ?


On 31 August 2013 06:55, zachariah ngonyani <zacha...@gmail.com> wrote:
I have a rails app that lists different law firms. These law firms can be categorized by Practice Area and Location. Now i need to implement a search, where people can select from a select option a Location AND a Practice Area and find all Law Firms that are in that selected Location which also Practice in the selected Area, any idea?
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5ba1e91e-9538-4585-a621-92d1bf986ac2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Walter Lee Davis

unread,
Sep 2, 2013, 11:40:43 AM9/2/13
to rubyonra...@googlegroups.com

On Aug 30, 2013, at 9:25 PM, zachariah ngonyani wrote:

> I have a rails app that lists different law firms. These law firms can be categorized by Practice Area and Location. Now i need to implement a search, where people can select from a select option a Location AND a Practice Area and find all Law Firms that are in that selected Location which also Practice in the selected Area, any idea?
> Thanks
>

Are you looking for the UI where you choose from one picker and the next picker is updated with relevant sub-options from that first choice? Have a search on Railscasts for a nice breakdown of how to do that.

Walter


Reply all
Reply to author
Forward
0 new messages