Tabnine Logo
FieldMapper$Builder.getDefaultIndexOption
Code IndexAdd Tabnine to your IDE (free)

How to use
getDefaultIndexOption
method
in
org.elasticsearch.index.mapper.FieldMapper$Builder

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

origin: org.elasticsearch/elasticsearch

public T index(boolean index) {
  if (index) {
    if (fieldType.indexOptions() == IndexOptions.NONE) {
      /*
       * the logic here is to reset to the default options only if we are not indexed ie. options are null
       * if the fieldType has a non-null option we are all good it might have been set through a different
       * call.
       */
      IndexOptions options = getDefaultIndexOption();
      if (options == IndexOptions.NONE) {
        // can happen when an existing type on the same index has disabled indexing
        // since we inherit the default field type from the first mapper that is
        // created on an index
        throw new IllegalArgumentException("mapper [" + name + "] has different [index] values from other types"
          + " of the same index");
      }
      fieldType.setIndexOptions(options);
    }
  } else {
    fieldType.setIndexOptions(IndexOptions.NONE);
  }
  return builder;
}
origin: apache/servicemix-bundles

public T index(boolean index) {
  if (index) {
    if (fieldType.indexOptions() == IndexOptions.NONE) {
      /*
       * the logic here is to reset to the default options only if we are not indexed ie. options are null
       * if the fieldType has a non-null option we are all good it might have been set through a different
       * call.
       */
      IndexOptions options = getDefaultIndexOption();
      if (options == IndexOptions.NONE) {
        // can happen when an existing type on the same index has disabled indexing
        // since we inherit the default field type from the first mapper that is
        // created on an index
        throw new IllegalArgumentException("mapper [" + name + "] has different [index] values from other types of the same index");
      }
      fieldType.setIndexOptions(options);
    }
  } else {
    fieldType.setIndexOptions(IndexOptions.NONE);
  }
  return builder;
}
origin: harbby/presto-connectors

public T index(boolean index) {
  if (index) {
    if (fieldType.indexOptions() == IndexOptions.NONE) {
      /*
       * the logic here is to reset to the default options only if we are not indexed ie. options are null
       * if the fieldType has a non-null option we are all good it might have been set through a different
       * call.
       */
      IndexOptions options = getDefaultIndexOption();
      if (options == IndexOptions.NONE) {
        // can happen when an existing type on the same index has disabled indexing
        // since we inherit the default field type from the first mapper that is
        // created on an index
        throw new IllegalArgumentException("mapper [" + name + "] has different [index] values from other types of the same index");
      }
      fieldType.setIndexOptions(options);
    }
  } else {
    fieldType.setIndexOptions(IndexOptions.NONE);
  }
  return builder;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public T index(boolean index) {
  if (index) {
    if (fieldType.indexOptions() == IndexOptions.NONE) {
      /*
       * the logic here is to reset to the default options only if we are not indexed ie. options are null
       * if the fieldType has a non-null option we are all good it might have been set through a different
       * call.
       */
      IndexOptions options = getDefaultIndexOption();
      if (options == IndexOptions.NONE) {
        // can happen when an existing type on the same index has disabled indexing
        // since we inherit the default field type from the first mapper that is
        // created on an index
        throw new IllegalArgumentException("mapper [" + name + "] has different [index] values from other types of the same index");
      }
      fieldType.setIndexOptions(options);
    }
  } else {
    fieldType.setIndexOptions(IndexOptions.NONE);
  }
  return builder;
}
origin: com.strapdata.elasticsearch/elasticsearch

public T index(boolean index) {
  if (index) {
    if (fieldType.indexOptions() == IndexOptions.NONE) {
      /*
       * the logic here is to reset to the default options only if we are not indexed ie. options are null
       * if the fieldType has a non-null option we are all good it might have been set through a different
       * call.
       */
      IndexOptions options = getDefaultIndexOption();
      if (options == IndexOptions.NONE) {
        // can happen when an existing type on the same index has disabled indexing
        // since we inherit the default field type from the first mapper that is
        // created on an index
        throw new IllegalArgumentException("mapper [" + name + "] has different [index] values from other types of the same index");
      }
      fieldType.setIndexOptions(options);
    }
  } else {
    fieldType.setIndexOptions(IndexOptions.NONE);
  }
  return builder;
}
org.elasticsearch.index.mapperFieldMapper$BuildergetDefaultIndexOption

Popular methods of FieldMapper$Builder

  • fieldType
  • docValues
  • setupFieldType
  • addMultiField
  • boost
  • buildFullName
  • copyTo
  • includeInAll
  • index
  • indexAnalyzer
  • indexOptions
  • name
  • indexOptions,
  • name,
  • omitNorms,
  • searchAnalyzer,
  • similarity,
  • store,
  • storeTermVectorOffsets,
  • storeTermVectorPayloads,
  • storeTermVectorPositions

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Path (java.nio.file)
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JPanel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Sublime Text 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