Skip to content

Commit

Permalink
Revert "Add getMapper(field) to Mapper, so both field with multifield…
Browse files Browse the repository at this point in the history
…s and object mappers can provide underlying field mappers"

This reverts commit 05aa06f.
  • Loading branch information
carlosdelest committed Mar 22, 2024
1 parent 068615a commit 5c3d9c4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public Iterator<Mapper> iterator() {
return Collections.emptyIterator();
}

@Override
public Mapper getMapper(String field) {
return null;
}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
return builder.startObject(simpleName()).field("type", CONTENT_TYPE).field(Names.PATH, path).endObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,6 @@ public Iterator<Mapper> iterator() {
return multiFieldsIterator();
}

@Override
public Mapper getMapper(String field) {
while (iterator().hasNext()) {
Mapper mapper = iterator().next();
if (mapper.simpleName().equals(field)) {
return mapper;
}
}
return null;
}

protected Iterator<Mapper> multiFieldsIterator() {
return Iterators.forArray(multiFields.mappers);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,4 @@ public static FieldType freezeAndDeduplicateFieldType(FieldType fieldType) {
* Defines how this mapper counts towards {@link MapperService#INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING}.
*/
public abstract int getTotalFieldsCount();

/**
* Returns a submapper for this mapper, if it exists.
*
* @param field field name from which to obtain the mapper
* @return submapper
*/
public abstract Mapper getMapper(String field);
}

0 comments on commit 5c3d9c4

Please sign in to comment.