Tabnine Logo
FieldMapper$MultiFields.updateFieldType
Code IndexAdd Tabnine to your IDE (free)

How to use
updateFieldType
method
in
org.elasticsearch.index.mapper.FieldMapper$MultiFields

Best Java code snippets using org.elasticsearch.index.mapper.FieldMapper$MultiFields.updateFieldType (Showing top 5 results out of 315)

origin: org.elasticsearch/elasticsearch

@Override
public FieldMapper updateFieldType(Map<String, MappedFieldType> fullNameToFieldType) {
  final MappedFieldType newFieldType = fullNameToFieldType.get(fieldType.name());
  if (newFieldType == null) {
    // this field does not exist in the mappings yet
    // this can happen if this mapper represents a mapping update
    return this;
  } else if (fieldType.getClass() != newFieldType.getClass()) {
    throw new IllegalStateException("Mixing up field types: " +
      fieldType.getClass() + " != " + newFieldType.getClass() + " on field " + fieldType.name());
  }
  MultiFields updatedMultiFields = multiFields.updateFieldType(fullNameToFieldType);
  if (fieldType == newFieldType && multiFields == updatedMultiFields) {
    return this; // no change
  }
  FieldMapper updated = clone();
  updated.fieldType = newFieldType;
  updated.multiFields = updatedMultiFields;
  return updated;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public FieldMapper updateFieldType(Map<String, MappedFieldType> fullNameToFieldType) {
  final MappedFieldType newFieldType = fullNameToFieldType.get(fieldType.name());
  if (newFieldType == null) {
    // this field does not exist in the mappings yet
    // this can happen if this mapper represents a mapping update
    return this;
  } else if (fieldType.getClass() != newFieldType.getClass()) {
    throw new IllegalStateException("Mixing up field types: " +
      fieldType.getClass() + " != " + newFieldType.getClass() + " on field " + fieldType.name());
  }
  MultiFields updatedMultiFields = multiFields.updateFieldType(fullNameToFieldType);
  if (fieldType == newFieldType && multiFields == updatedMultiFields) {
    return this; // no change
  }
  FieldMapper updated = clone();
  updated.fieldType = newFieldType;
  updated.multiFields = updatedMultiFields;
  return updated;
}
origin: com.strapdata.elasticsearch/elasticsearch

@Override
public FieldMapper updateFieldType(Map<String, MappedFieldType> fullNameToFieldType) {
  final MappedFieldType newFieldType = fullNameToFieldType.get(fieldType.name());
  if (newFieldType == null) {
    // this field does not exist in the mappings yet
    // this can happen if this mapper represents a mapping update
    return this;
  } else if (fieldType.getClass() != newFieldType.getClass()) {
    throw new IllegalStateException("Mixing up field types: " +
      fieldType.getClass() + " != " + newFieldType.getClass() + " on field " + fieldType.name());
  }
  MultiFields updatedMultiFields = multiFields.updateFieldType(fullNameToFieldType);
  if (fieldType == newFieldType && multiFields == updatedMultiFields) {
    return this; // no change
  }
  FieldMapper updated = clone();
  updated.fieldType = newFieldType;
  updated.multiFields = updatedMultiFields;
  return updated;
}
origin: apache/servicemix-bundles

@Override
public FieldMapper updateFieldType(Map<String, MappedFieldType> fullNameToFieldType) {
  final MappedFieldType newFieldType = fullNameToFieldType.get(fieldType.name());
  if (newFieldType == null) {
    // this field does not exist in the mappings yet
    // this can happen if this mapper represents a mapping update
    return this;
  } else if (fieldType.getClass() != newFieldType.getClass()) {
    throw new IllegalStateException("Mixing up field types: " +
      fieldType.getClass() + " != " + newFieldType.getClass() + " on field " + fieldType.name());
  }
  MultiFields updatedMultiFields = multiFields.updateFieldType(fullNameToFieldType);
  if (fieldType == newFieldType && multiFields == updatedMultiFields) {
    return this; // no change
  }
  FieldMapper updated = clone();
  updated.fieldType = newFieldType;
  updated.multiFields = updatedMultiFields;
  return updated;
}
origin: harbby/presto-connectors

@Override
public FieldMapper updateFieldType(Map<String, MappedFieldType> fullNameToFieldType) {
  final MappedFieldType newFieldType = fullNameToFieldType.get(fieldType.names().fullName());
  if (newFieldType == null) {
    // this field does not exist in the mappings yet
    // this can happen if this mapper represents a mapping update
    return this;
  } else if (fieldType.getClass() != newFieldType.getClass()) {
    throw new IllegalStateException("Mixing up field types: " +
      fieldType.getClass() + " != " + newFieldType.getClass() + " on field " + fieldType.names().fullName());
  }
  MultiFields updatedMultiFields = multiFields.updateFieldType(fullNameToFieldType);
  if (fieldType == newFieldType && multiFields == updatedMultiFields) {
    return this; // no change
  }
  FieldMapper updated = clone();
  updated.fieldType = newFieldType;
  updated.multiFields = updatedMultiFields;
  return updated;
}
org.elasticsearch.index.mapperFieldMapper$MultiFieldsupdateFieldType

Popular methods of FieldMapper$MultiFields

  • empty
  • toXContent
  • <init>
  • iterator
  • merge
  • parse
  • create

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Option (scala)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now