Java Code Examples for org.elasticsearch.index.mapper.MappedFieldType#clone()

The following examples show how to use org.elasticsearch.index.mapper.MappedFieldType#clone() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IdFieldMapper.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
private static MappedFieldType idFieldType(Settings indexSettings, MappedFieldType existing) {
    if (existing != null) {
        return existing.clone();
    }
    MappedFieldType fieldType = Defaults.FIELD_TYPE.clone();
    boolean pre2x = Version.indexCreated(indexSettings).before(Version.V_2_0_0_beta1);
    if (pre2x && indexSettings.getAsBoolean("index.mapping._id.indexed", true) == false) {
        fieldType.setTokenized(false);
    }
    return fieldType;
}
 
Example 2
Source File: RoutingFieldMapper.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
private RoutingFieldMapper(Settings indexSettings, MappedFieldType existing) {
    this(existing == null ? Defaults.FIELD_TYPE.clone() : existing.clone(), Defaults.REQUIRED, Defaults.PATH, indexSettings);
}
 
Example 3
Source File: FieldNamesFieldMapper.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
private FieldNamesFieldMapper(Settings indexSettings, MappedFieldType existing) {
    this(existing == null ? Defaults.FIELD_TYPE.clone() : existing.clone(), indexSettings);
}
 
Example 4
Source File: ParentFieldMapper.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
private ParentFieldMapper(Settings indexSettings, MappedFieldType existing, String parentType) {
    this(existing == null ? Defaults.FIELD_TYPE.clone() : existing.clone(), joinFieldTypeForParentType(parentType, indexSettings), null, null, indexSettings);
}
 
Example 5
Source File: TypeFieldMapper.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
private TypeFieldMapper(Settings indexSettings, MappedFieldType existing) {
    this(existing == null ? defaultFieldType(indexSettings) : existing.clone(),
         indexSettings);
}
 
Example 6
Source File: AllFieldMapper.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
private AllFieldMapper(Settings indexSettings, MappedFieldType existing) {
    this(existing == null ? Defaults.FIELD_TYPE.clone() : existing.clone(), Defaults.ENABLED, indexSettings);
}