Adding logic behind the search options

Leveraging AREL to represent the query.
Missing top-level module documentation comment.