Added complex search queries to database search

Also allowed selecting of further search results