Examples of mapper()


Examples of org.elasticsearch.index.mapper.FieldMappers.mapper()

                    }
                } else if (x.mapper().fieldType().stored()) {
                    if (fieldNames == null) {
                        fieldNames = new HashSet<>();
                    }
                    fieldNames.add(x.mapper().names().indexName());
                } else {
                    if (extractFieldNames == null) {
                        extractFieldNames = newArrayList();
                    }
                    extractFieldNames.add(fieldName);
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMappers.mapper()

            MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(field);
            if (smartNameFieldMappers != null) {
                nonNullFieldMappers = smartNameFieldMappers;
            }
            Filter filter = null;
            if (fieldNamesMapper!= null && fieldNamesMapper.mapper().fieldType().indexOptions() != IndexOptions.NONE) {
                final String f;
                if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
                    f = smartNameFieldMappers.mapper().names().indexName();
                } else {
                    f = field;
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMappers.mapper()

                if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
                    f = smartNameFieldMappers.mapper().names().indexName();
                } else {
                    f = field;
                }
                filter = fieldNamesMapper.mapper().termFilter(f, parseContext);
            }
            // if _field_names are not indexed, we need to go the slow way
            if (filter == null && smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
                filter = smartNameFieldMappers.mapper().rangeFilter(null, null, true, true, parseContext);
            }
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMappers.mapper()

        final FieldMappers indexName = mapperService.indexName(field);
        if (indexName == null) {
            logger.warn("no index mapper found for field: [{}] returning default postings format", field);
            return defaultPostingFormat;
        }
        PostingsFormatProvider postingsFormat = indexName.mapper().postingsFormatProvider();
        return postingsFormat != null ? postingsFormat.get() : defaultPostingFormat;
    }

    @Override
    public DocValuesFormat getDocValuesFormatForField(String field) {
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMappers.mapper()

        final FieldMappers indexName = mapperService.indexName(field);
        if (indexName == null) {
            logger.warn("no index mapper found for field: [{}] returning default doc values format", field);
            return defaultDocValuesFormat;
        }
        DocValuesFormatProvider docValuesFormat = indexName.mapper().docValuesFormatProvider();
        return docValuesFormat != null ? docValuesFormat.get() : defaultDocValuesFormat;
    }
}
View Full Code Here

Examples of org.elasticsearch.index.mapper.ObjectMappers.mapper()

        if (nestedPath != null) {
            ObjectMappers objectMappers = context.mapperService().objectMapper(nestedPath);
            if (objectMappers == null) {
                throw new ElasticsearchIllegalArgumentException("failed to find nested object mapping for explicit nested path [" + nestedPath + "]");
            }
            objectMapper = objectMappers.mapper();
            if (!objectMapper.nested().isNested()) {
                throw new ElasticsearchIllegalArgumentException("mapping for explicit nested path is not mapped as nested: [" + nestedPath + "]");
            }
        } else {
            objectMapper = context.mapperService().resolveClosestNestedObjectMapper(fieldName);
View Full Code Here

Examples of org.elasticsearch.index.mapper.ObjectMappers.mapper()

            if (nestedPath != null) {
                ObjectMappers objectMappers = context.mapperService().objectMapper(nestedPath);
                if (objectMappers == null) {
                    throw new ElasticsearchIllegalArgumentException("failed to find nested object mapping for explicit nested path [" + nestedPath + "]");
                }
                objectMapper = objectMappers.mapper();
                if (!objectMapper.nested().isNested()) {
                    throw new ElasticsearchIllegalArgumentException("mapping for explicit nested path is not mapped as nested: [" + nestedPath + "]");
                }
            } else if (!(context instanceof TopHitsContext)) {
                // Only automatically resolve nested path when sort isn't defined for top_hits
View Full Code Here

Examples of org.elasticsearch.index.mapper.ObjectMappers.mapper()

        if (nestedPath != null) {
            ObjectMappers objectMappers = context.mapperService().objectMapper(nestedPath);
            if (objectMappers == null) {
                throw new ElasticsearchIllegalArgumentException("failed to find nested object mapping for explicit nested path [" + nestedPath + "]");
            }
            objectMapper = objectMappers.mapper();
            if (!objectMapper.nested().isNested()) {
                throw new ElasticsearchIllegalArgumentException("mapping for explicit nested path is not mapped as nested: [" + nestedPath + "]");
            }

            BitDocIdSetFilter rootDocumentsFilter = context.bitsetFilterCache().getBitDocIdSetFilter(NonNestedDocsFilter.INSTANCE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.