Fix bug when using 'not' statement
Adds sorting cabability for 'search' and 'compound_search'
Adds TODO to support cursor pagination