protected when not of the same type mapper when merging
This commit is contained in:
parent
9f6fde9adb
commit
cf998e2f89
|
@ -216,6 +216,9 @@ public class XContentDateFieldMapper extends XContentNumberFieldMapper<Long> {
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.nullValue = ((XContentDateFieldMapper) mergeWith).nullValue;
|
||||
}
|
||||
|
|
|
@ -198,6 +198,9 @@ public class XContentDoubleFieldMapper extends XContentNumberFieldMapper<Double>
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.nullValue = ((XContentDoubleFieldMapper) mergeWith).nullValue;
|
||||
this.nullValueAsString = ((XContentDoubleFieldMapper) mergeWith).nullValueAsString;
|
||||
|
|
|
@ -197,6 +197,9 @@ public class XContentFloatFieldMapper extends XContentNumberFieldMapper<Float> {
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.nullValue = ((XContentFloatFieldMapper) mergeWith).nullValue;
|
||||
this.nullValueAsString = ((XContentFloatFieldMapper) mergeWith).nullValueAsString;
|
||||
|
|
|
@ -197,6 +197,9 @@ public class XContentIntegerFieldMapper extends XContentNumberFieldMapper<Intege
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.nullValue = ((XContentIntegerFieldMapper) mergeWith).nullValue;
|
||||
this.nullValueAsString = ((XContentIntegerFieldMapper) mergeWith).nullValueAsString;
|
||||
|
|
|
@ -197,6 +197,9 @@ public class XContentLongFieldMapper extends XContentNumberFieldMapper<Long> {
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.nullValue = ((XContentLongFieldMapper) mergeWith).nullValue;
|
||||
this.nullValueAsString = ((XContentLongFieldMapper) mergeWith).nullValueAsString;
|
||||
|
|
|
@ -159,6 +159,9 @@ public abstract class XContentNumberFieldMapper<T extends Number> extends XConte
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.precisionStep = ((XContentNumberFieldMapper) mergeWith).precisionStep;
|
||||
this.includeInAll = ((XContentNumberFieldMapper) mergeWith).includeInAll;
|
||||
|
|
|
@ -197,6 +197,9 @@ public class XContentShortFieldMapper extends XContentNumberFieldMapper<Short> {
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.nullValue = ((XContentShortFieldMapper) mergeWith).nullValue;
|
||||
this.nullValueAsString = ((XContentShortFieldMapper) mergeWith).nullValueAsString;
|
||||
|
|
|
@ -151,6 +151,9 @@ public class XContentStringFieldMapper extends XContentFieldMapper<String> imple
|
|||
|
||||
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
|
||||
super.merge(mergeWith, mergeContext);
|
||||
if (!this.getClass().equals(mergeWith.getClass())) {
|
||||
return;
|
||||
}
|
||||
if (!mergeContext.mergeFlags().simulate()) {
|
||||
this.includeInAll = ((XContentStringFieldMapper) mergeWith).includeInAll;
|
||||
this.nullValue = ((XContentStringFieldMapper) mergeWith).nullValue;
|
||||
|
|
Loading…
Reference in New Issue