def unsorted_query
      records = scope
      # Text Search
      if search_term
        escaped = Regexp.escape(search_term)
        regexp  = Regexp.new(escaped, Regexp::IGNORECASE)
        if search_columns.size == 1
          records = records.where(search_columns.first => regexp)
        else
          cols    = search_columns.collect { |col| {col => regexp} }
          records = records.where('$or' => cols)
        end
      end

      # Pagination
      if start && page_size
        records = records.skip(start).limit(page_size)
      end
      records
    end
def unsorted_query
      records = scope
      # Text Search
      if search_term
        escaped = Regexp.escape(search_term)
        regexp  = Regexp.new(escaped, Regexp::IGNORECASE)
        if search_columns.size == 1
          records = records.where(search_columns.first => regexp)
        else
          cols    = search_columns.collect { |col| {col => regexp} }
          records = records.where('$or' => cols)
        end
      end

      # Pagination
      if start && page_size
        records = records.skip(start).limit(page_size)
      end
      records
    end
Returns the filtered query expression