@Override
 public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
   super.merge(mergeWith, mergeContext);
   if (!this.getClass().equals(mergeWith.getClass())) {
     return;
   }
   if (!mergeContext.mergeFlags().simulate()) {
     this.nullValue = ((IpFieldMapper) mergeWith).nullValue;
   }
 }
 @Override
 public void merge(Mapper mergeWith, MergeResult mergeResult) throws MergeMappingException {
   super.merge(mergeWith, mergeResult);
   if (!this.getClass().equals(mergeWith.getClass())) {
     return;
   }
   if (!mergeResult.simulate()) {
     this.fieldType = this.fieldType.clone();
     this.fieldType.setNullValue(((ShortFieldMapper) mergeWith).fieldType().nullValue());
     this.fieldType.freeze();
   }
 }
 @Override
 public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
   super.merge(mergeWith, mergeContext);
   if (!this.getClass().equals(mergeWith.getClass())) {
     return;
   }
   if (!mergeContext.mergeFlags().simulate()) {
     this.precisionStep = ((NumberFieldMapper) mergeWith).precisionStep;
     this.includeInAll = ((NumberFieldMapper) mergeWith).includeInAll;
     this.fuzzyFactor = ((NumberFieldMapper) mergeWith).fuzzyFactor;
     this.dFuzzyFactor = parseFuzzyFactor(this.fuzzyFactor);
   }
 }
  @Override
  public void merge(Mapper mergeWith, MergeResult mergeResult) throws MergeMappingException {
    super.merge(mergeWith, mergeResult);
    if (!this.getClass().equals(mergeWith.getClass())) {
      return;
    }

    GeoShapeFieldMapper gsfm = (GeoShapeFieldMapper) mergeWith;
    if (mergeResult.simulate() == false && mergeResult.hasConflicts() == false) {
      if (gsfm.coerce.explicit()) {
        this.coerce = gsfm.coerce;
      }
    }
  }
Exemple #5
0
 @Override
 public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException {
   super.merge(mergeWith, mergeContext);
   if (!this.getClass().equals(mergeWith.getClass())) {
     return;
   }
   OntologySettings mergeSettings = ((OntologyMapper) mergeWith).ontologySettings;
   if (mergeSettings.getOntologyUri() != null
       && !mergeSettings.getOntologyUri().equals(ontologySettings.getOntologyUri())) {
     mergeContext.addConflict("mapper [" + names.fullName() + "] has different ontology URI");
   } else if (mergeSettings.getOlsBaseUrl() != null
       && !mergeSettings.getOlsBaseUrl().equals(ontologySettings.getOlsBaseUrl())) {
     mergeContext.addConflict("mapper [" + names.fullName() + "] has different OLS base URL");
   }
 }