Adding logic behind the search options

Leveraging AREL to represent the query.