 # We assign local references to the underscore methods used.
 # If underscore is not supplied we use the above ES5 methods
 createUtils = (_) ->
-  for key in ["every", "some", "filter", "first", "find", "reject", "reduce", "property",
-      "intersection", "isEqual", "keys", "isArray", "result", "map", "includes", "isNaN"]
+  for key in ["every", "some", "filter", "first", "find", "reject", "reduce", "property", "sortBy"
+      "indexOf", "intersection", "isEqual", "keys", "isArray", "result", "map", "includes", "isNaN"]
     utils[key] = _[key]
     throw new Error("#{key} missing. Please ensure that you first initialize
       underscore-query with either lodash or underscore") unless utils[key]

      memo.concat parsed

  # Loop through all the different queries
  utils.reduce(queryArray, iteratee, [])

# Tests query value, to ensure that it is of the correct type
testQueryValue = (queryType, value) ->

  # Return the query object
  return result

# Order in which to sort tags in order to optimize speed. Tags at the start of this array
# are ones which can be evaluated quickly in order to avoid running the slower tags
tag_sort_order = [
  "$lt", "$lte", "$gt", "$gte",
  "$exists", "$has", "$type", "$ne", "$equal",
  "$mod", "$size", "$between", "$betweene",
  "$startsWith", "$endsWith", "$like", "$likeI",
  "$cb", "$regex", "$regexp",
  "$contains", "$in", "$nin", "$all", "$any",
  "$deepEqual", "$elemMatch",
  "$not", "$and", "$or", "$nor"
]

# This function parses and normalizes raw queries.
parseSubQuery = (rawQuery, type) ->
