TextMapper extends SingleColumnMapper.SingleFieldMapper<String> { @Override public Optional<Field> sortedField(String name, String value) { return Optional.empty(); } TextMapper(String field, String column, Boolean validated, String analyzer); @Override Optional<Field> indexedField(String name, String value); @Override Optional<Field> sortedField(String name, String value); @Override SortField sortField(String name, boolean reverse); @Override String toString();  }
@Test public void testSortedField() { TextMapper mapper = textMapper().analyzer("org.apache.lucene.analysis.en.EnglishAnalyzer").build("field"); assertFalse("Sorted field should not be created", mapper.sortedField("name", "hello").isPresent()); }