code: public Query addRefinementsByString(String refinementString) {
      if (refinementString == null) {
        return this;
      }
      String[] filterStrings = splitRefinements(refinementString);
      for (String filterString : filterStrings) {
        if (StringUtils.isBlank(filterString) || "=".equals(filterString)) {
          continue;
        }
        int colon = filterString.indexOf(":");
        int equals = filterString.indexOf("=");
        boolean isRange = colon != -1 && equals == -1;
        String[] nameValue = filterString.split("[:=]", 2);
        Refinement refinement;
        if (isRange) {
          RefinementRange rr = new RefinementRange();
          if (nameValue[1].endsWith("..")) {
            rr.setLow(nameValue[1].split(DOTS)[0]);
            rr.setHigh("");
          } else if (nameValue[1].startsWith("..")) {
            rr.setLow("");
            rr.setHigh(nameValue[1].split(DOTS)[1]);
          } else {
            String[] lowHigh = nameValue[1].split(DOTS);
            rr.setLow(lowHigh[0]);
            rr.setHigh(lowHigh[1]);
          }
          refinement = rr;
        } else {
          refinement = new RefinementValue();
          ((RefinementValue) refinement).setValue(nameValue[1]);
        }
        if (StringUtils.isNotBlank(nameValue[0])) {
          addRefinement(nameValue[0], refinement);
        }
      }
      return this;
    }
docs: <code>
  A helper method to parse and set refinements.
  If you pass in refinements of the format
  
  Brand=Bose~price:20..80
  
  The query object will correctly parse out the refinements.
  </code>
  
  @param refinementString
  A tilde separated list of refinements