text: public IndexableField[] getFields(String name) {List<IndexableField> result = new ArrayList<>();for (IndexableField field : fields) {if (field.name().equals(name)) {result.add(field);}}return result.toArray(new IndexableField[result.size()]);}