Package org.elasticsearch.index.mapper

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


                }

                Object value = null;
                FieldMappers fieldMappers = documentMapper.mappers().indexName(field.name());
                if (fieldMappers != null) {
                    FieldMapper mapper = fieldMappers.mapper();
                    if (mapper != null) {
                        name = mapper.names().fullName();
                        value = mapper.valueForSearch(field);
                    }
                }
View Full Code Here


                    final Set<String> fields = newHashSet();
                    if (request.fields() != null) {
                        for (String field : request.fields()) {
                            FieldMappers fieldMappers = docMapper.mappers().smartName(field);
                            if (fieldMappers != null) {
                                fields.add(fieldMappers.mapper().names().indexName());
                            } else {
                                fields.add(field);
                            }
                        }
                    }
View Full Code Here

        assertThat(f.stringValue(), equalTo("some name"));
        assertThat(f.isStored(), equalTo(true));

        FieldMappers fieldMappers = docMapper.mappers().fullName("name");
        assertThat(fieldMappers.mappers().size(), equalTo(1));
        assertThat(fieldMappers.mapper().stored(), equalTo(true));

        f = doc.getFieldable("age");
        assertThat(f.name(), equalTo("age"));
        assertThat(f.isStored(), equalTo(true));
View Full Code Here

        assertThat(f.name(), equalTo("age"));
        assertThat(f.isStored(), equalTo(true));

        fieldMappers = docMapper.mappers().fullName("age");
        assertThat(fieldMappers.mappers().size(), equalTo(1));
        assertThat(fieldMappers.mapper().stored(), equalTo(true));
    }
}
View Full Code Here

                    sourceRequested = true;
                    continue;
                }
                FieldMappers x = context.smartNameFieldMappers
                        (fieldName);
                if (x != null && x.mapper().fieldType().stored()) {
                    if (fieldNames == null) {
                        fieldNames = new HashSet<String>();
                    }
                    fieldNames.add(x.mapper().names().indexName());
                } else {
View Full Code Here

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

                if (fieldName.equals(SourceFieldMapper.NAME)) {
                    sourceRequested = true;
                    continue;
                }
                FieldMappers x = context.smartNameFieldMappers(fieldName);
                if (x != null && x.mapper().fieldType().stored()) {
                    if (fieldNames == null) {
                        fieldNames = new HashSet<String>();
                    }
                    fieldNames.add(x.mapper().names().indexName());
                } else {
View Full Code Here

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

                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

                    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

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.