code: @Override
      public Query query(Schema schema) {
  
          if (field == null || field.trim().isEmpty()) {
              throw new IllegalArgumentException("Field name required");
          }
          if (value == null || value.trim().isEmpty()) {
              throw new IllegalArgumentException("Field value required");
          }
          if (maxEdits < 0 || maxEdits > 2) {
              throw new IllegalArgumentException("max_edits must be between 0 and 2");
          }
          if (prefixLength < 0) {
              throw new IllegalArgumentException("prefix_length must be positive.");
          }
          if (maxExpansions < 0) {
              throw new IllegalArgumentException("max_expansions must be positive.");
          }
  
          ColumnMapperSingle<?> columnMapper = getMapper(schema, field);
          Class<?> clazz = columnMapper.baseClass();
          if (clazz == String.class) {
              String analyzedValue = analyze(field, value, schema);
              Term term = new Term(field, analyzedValue);
              Query query = new FuzzyQuery(term, maxEdits, prefixLength, maxExpansions, transpositions);
              query.setBoost(boost);
              return query;
          } else {
              String message = String.format("Fuzzy queries are not supported by %s mapper", clazz.getSimpleName());
              throw new UnsupportedOperationException(message);
          }
      }
docs: {@inheritDoc}