code: public SearchQuery sort(Object... sort) {
          if (sort != null) {
              for (Object o : sort) {
                  if (o instanceof String) {
                      this.sort.add((String) o);
                  } else if (o instanceof SearchSort) {
                      JsonObject params = JsonObject.create();
                      ((SearchSort) o).injectParams(params);
                      this.sort.add(params);
                  } else if (o instanceof JsonObject) {
                      this.sort.add(o);
                  } else {
                      throw new IllegalArgumentException("Only String ort SearchSort " +
                          "instances are allowed as sort arguments!");
                  }
              }
          }
          return this;
      }
docs: Configures the list of fields (including special fields) which are used for sorting purposes. If empty, the
  default sorting (descending by score) is used by the server.
  
  The list of sort fields can include actual fields (like "firstname" but then they must be stored in the index,
  configured in the server side mapping). Fields provided first are considered first and in a "tie" case the
  next sort field is considered. So sorting by "firstname" and then "lastname" will first sort ascending by
  the firstname and if the names are equal then sort ascending by lastname. Special fields like "_id" and "_score"
  can also be used. If prefixed with "-" the sort order is set to descending.
  
  If no sort is provided, it is equal to sort("-_score"), since the server will sort it by score in descending
  order.
  
  @param sort the fields that should take part in the sorting.
  @return this SearchQuery for chaining.