CacheEntry.search(query, search, limit, offset, sortArr).then(function(result){

        // Create the return copy of the users
        var entries = [];
        result.results.forEach(function(element){