Package org.elasticsearch.common.text

Examples of org.elasticsearch.common.text.StringAndBytesText


        DocumentMapper documentMapper = context.mapperService()
                .documentMapper(fieldsVisitor.uid().type());
        Text typeText;
        if (documentMapper == null) {
            typeText = new StringAndBytesText(fieldsVisitor.uid().type());
        } else {
            typeText = documentMapper.typeText();
        }

        InternalSearchHit searchHit = new InternalSearchHit(doc,
View Full Code Here


        DocumentMapper documentMapper = context.mapperService().documentMapper(
                fieldsVisitor.uid().type());
        Text typeText;
        if (documentMapper == null) {
            typeText = new StringAndBytesText(fieldsVisitor.uid().type());
        } else {
            typeText = documentMapper.typeText();
        }

        InternalSearchHit searchHit = new InternalSearchHit(doc,
View Full Code Here

                          NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer, NamedAnalyzer searchQuoteAnalyzer,
                          Map<Class<? extends RootMapper>, RootMapper> rootMappers, List<SourceTransform> sourceTransforms) {
        this.index = index;
        this.indexSettings = indexSettings;
        this.type = rootObjectMapper.name();
        this.typeText = new StringAndBytesText(this.type);
        this.docMapperParser = docMapperParser;
        this.meta = meta;
        this.rootObjectMapper = rootObjectMapper;
        this.sourceTransforms = sourceTransforms;
View Full Code Here

    }

    public InternalSearchHit(int docId, String id, Text type, Map<String, SearchHitField> fields) {
        this.docId = docId;
        this.id = new StringAndBytesText(id);
        this.type = type;
        this.fields = fields;
    }
View Full Code Here

        this.fields = fields;
    }

    public InternalSearchHit(int nestedTopDocId, String id, Text type, InternalNestedIdentity nestedIdentity, Map<String, SearchHitField> fields) {
        this.docId = nestedTopDocId;
        this.id = new StringAndBytesText(id);
        this.type = type;
        this.nestedIdentity = nestedIdentity;
        this.fields = fields;
    }
View Full Code Here

        Object[] sortValuesCopy = new Object[sortValues.length];
        System.arraycopy(sortValues, 0, sortValuesCopy, 0, sortValues.length);
        if (sortValues != null) {
            for (int i = 0; i < sortValues.length; i++) {
                if (sortValues[i] instanceof BytesRef) {
                    sortValuesCopy[i] = new StringAndBytesText(new BytesArray((BytesRef) sortValues[i]));
                }
            }
        }
        this.sortValues = sortValuesCopy;
    }
View Full Code Here

        private Text field;
        private int offset;
        private InternalNestedIdentity child;

        public InternalNestedIdentity(String field, int offset, InternalNestedIdentity child) {
            this.field = new StringAndBytesText(field);
            this.offset = offset;
            this.child = child;
        }
View Full Code Here

    private SearchShardTarget() {

    }

    public SearchShardTarget(String nodeId, String index, int shardId) {
        this.nodeId = nodeId == null ? null : new StringAndBytesText(nodeId);
        this.index = new StringAndBytesText(index);
        this.shardId = shardId;
    }
View Full Code Here

    public Text readOptionalText() throws IOException {
        int length = readInt();
        if (length == -1) {
            return null;
        }
        return new StringAndBytesText(readBytesReference(length));
    }
View Full Code Here

    }

    public Text readText() throws IOException {
        // use StringAndBytes so we can cache the string if its ever converted to it
        int length = readInt();
        return new StringAndBytesText(readBytesReference(length));
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.text.StringAndBytesText

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.