Search in sources :

Example 1 with BinaryFieldMapper

use of org.elasticsearch.index.mapper.BinaryFieldMapper in project elasticsearch by elastic.

the class PercolatorFieldMapper method updateFieldType.

@Override
public FieldMapper updateFieldType(Map<String, MappedFieldType> fullNameToFieldType) {
    PercolatorFieldMapper updated = (PercolatorFieldMapper) super.updateFieldType(fullNameToFieldType);
    KeywordFieldMapper queryTermsUpdated = (KeywordFieldMapper) queryTermsField.updateFieldType(fullNameToFieldType);
    KeywordFieldMapper extractionResultUpdated = (KeywordFieldMapper) extractionResultField.updateFieldType(fullNameToFieldType);
    BinaryFieldMapper queryBuilderUpdated = (BinaryFieldMapper) queryBuilderField.updateFieldType(fullNameToFieldType);
    if (updated == this && queryTermsUpdated == queryTermsField && extractionResultUpdated == extractionResultField && queryBuilderUpdated == queryBuilderField) {
        return this;
    }
    if (updated == this) {
        updated = (PercolatorFieldMapper) updated.clone();
    }
    updated.queryTermsField = queryTermsUpdated;
    updated.extractionResultField = extractionResultUpdated;
    updated.queryBuilderField = queryBuilderUpdated;
    return updated;
}
Also used : KeywordFieldMapper(org.elasticsearch.index.mapper.KeywordFieldMapper) BinaryFieldMapper(org.elasticsearch.index.mapper.BinaryFieldMapper)

Aggregations

BinaryFieldMapper (org.elasticsearch.index.mapper.BinaryFieldMapper)1 KeywordFieldMapper (org.elasticsearch.index.mapper.KeywordFieldMapper)1