Adding logic behind the search options

Leveraging AREL to represent the query.
Use the `lambda` method for multi-line lambdas.