Package org.elasticsearch.index.fieldvisitor

Examples of org.elasticsearch.index.fieldvisitor.JustSourceFieldsVisitor


            sourceContentType = tuple.v1();
            source = tuple.v2();
            return source;
        }
        try {
            JustSourceFieldsVisitor sourceFieldVisitor = new JustSourceFieldsVisitor();
            reader.document(docId, sourceFieldVisitor);
            BytesReference source = sourceFieldVisitor.source();
            if (source == null) {
                this.source = ImmutableMap.of();
                this.sourceContentType = null;
            } else {
                Tuple<XContentType, Map<String, Object>> tuple = sourceAsMapAndType(source);
View Full Code Here


        return new GetResult(shardId.index().name(), type, id, get.version(), get.exists(), source, fields);
    }

    private static FieldsVisitor buildFieldsVisitors(String[] fields, FetchSourceContext fetchSourceContext) {
        if (fields == null || fields.length == 0) {
            return fetchSourceContext.fetchSource() ? new JustSourceFieldsVisitor() : null;
        }

        return new CustomFieldsVisitor(Sets.newHashSet(fields), fetchSourceContext.fetchSource());
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.fieldvisitor.JustSourceFieldsVisitor

Copyright © 2018 www.massapicom. 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.