code: protected String createSortQuery(final List<DefaultKeyValue<String, Boolean>> fields) {
          StringBuilder builder = new StringBuilder("{");
          Iterator<DefaultKeyValue<String, Boolean>> iter = fields.iterator();
          while (iter.hasNext()) {
              DefaultKeyValue<String, Boolean> field = iter.next();
              builder.append("\"");
              builder.append(field.getKey());
              builder.append("\"");
              builder.append(":");
              if (field.getValue()) {
                  builder.append(1);
              } else {
                  builder.append(-1);
              }
              if (iter.hasNext()) {
                  builder.append(",");
              }
          }
          builder.append("}");
          return builder.toString();
      }
docs: Creates a Sort query based on the fields.<br/>
  Key of the map is the field <b>False=Desc,True=asc</b>
  for the field, Respect order of the keys
  
  @param fields Keys are fields, true if asc, false desc
  @return Sorted Json string with the query.