Examples of UidAndSourceFieldSelector


Examples of org.elasticsearch.index.mapper.selector.UidAndSourceFieldSelector

        @Override public void setScorer(Scorer scorer) throws IOException {
        }

        @Override public void collect(int doc) throws IOException {
            // the _source is the query
            Document document = reader.document(doc, new UidAndSourceFieldSelector());
            String id = Uid.createUid(document.get(UidFieldMapper.NAME)).id();
            byte[] source = document.getBinaryValue(SourceFieldMapper.NAME);
            try {
                queries.put(id, percolator.parseQuery(id, source, 0, source.length));
            } catch (Exception e) {
View Full Code Here

Examples of org.elasticsearch.index.mapper.selector.UidAndSourceFieldSelector

            // we ask for script fields, and no field names, don't load the source
            return UidFieldSelector.INSTANCE;
        }

        if (!context.hasFieldNames()) {
            return new UidAndSourceFieldSelector();
        }

        if (context.fieldNames().isEmpty()) {
            return UidFieldSelector.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.