Added a flag to lookup, whether to sort results

Requests like autocomplete that don't need results to be paged (i.e. offset is 0)
will be handled much faster this way.