code: @Override
      public String indexValue(String name, Object value) {
  
          // Check not null
          if (value == null) {
              return null;
          }
  
          // Parse big decimal
          String svalue = value.toString();
          BigDecimal bd;
          try {
              bd = new BigDecimal(value.toString());
          } catch (NumberFormatException e) {
              String message = String.format("Field %s requires a base 10 decimal, but found \"%s\"", name, svalue);
              throw new IllegalArgumentException(message);
          }
  
          // Split integer and decimal part
          bd = bd.stripTrailingZeros();
          String[] parts = bd.toPlainString().split("\\.");
          String integerPart = parts[0];
          String decimalPart = parts.length == 1 ? "0" : parts[1];
  
          if (integerPart.replaceFirst("-", "").length() > integerDigits) {
              throw new IllegalArgumentException("Too much digits in integer part");
          }
          if (decimalPart.length() > decimalDigits) {
              throw new IllegalArgumentException("Too much digits in decimal part");
          }
  
          BigDecimal complemented = bd.add(complement);
          String bds[] = complemented.toString().split("\\.");
          integerPart = bds[0];
          decimalPart = bds.length == 2 ? bds[1] : "0";
          integerPart = StringUtils.leftPad(integerPart, integerDigits + 1, '0');
  
          return integerPart + "." + decimalPart;
      }
docs: {@inheritDoc}