Skip to content

Allow plugins to access/override some functions of ParametrizedFieldMapper; Modify the the constructor of the MappedFieldType to support FilterFieldType. #17575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public MappedFieldType(
TextSearchInfo textSearchInfo,
Map<String, String> meta
) {
setBoost(1.0f);
this.boost = 1.0f;
this.name = Objects.requireNonNull(name);
this.isIndexed = isIndexed;
this.isStored = isStored;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ParametrizedFieldMapper(String simpleName, MappedFieldType mappedField
public abstract ParametrizedFieldMapper.Builder getMergeBuilder();

@Override
public final ParametrizedFieldMapper merge(Mapper mergeWith) {
public ParametrizedFieldMapper merge(Mapper mergeWith) {

if (mergeWith instanceof FieldMapper == false) {
throw new IllegalArgumentException(
Expand Down Expand Up @@ -348,7 +348,7 @@ private void merge(FieldMapper toMerge, Conflicts conflicts) {
}
}

protected void toXContent(XContentBuilder builder, boolean includeDefaults) throws IOException {
public void toXContent(XContentBuilder builder, boolean includeDefaults) throws IOException {
if (serializerCheck.check(includeDefaults, isConfigured(), get())) {
serializer.serialize(builder, name, getValue());
}
Expand Down Expand Up @@ -649,7 +649,7 @@ protected String buildFullName(BuilderContext context) {
/**
* Writes the current builder parameter values as XContent
*/
protected final void toXContent(XContentBuilder builder, boolean includeDefaults) throws IOException {
public final void toXContent(XContentBuilder builder, boolean includeDefaults) throws IOException {
for (Parameter<?> parameter : getParameters()) {
parameter.toXContent(builder, includeDefaults);
}
Expand Down
Loading