Package org.elasticsearch.common.io

Examples of org.elasticsearch.common.io.FastStringReader


            bq.add(mltQuery, BooleanClause.Occur.SHOULD);
        }
        if (this.likeText != null) {
            Reader[] readers = new Reader[likeText.length];
            for (int i = 0; i < readers.length; i++) {
                readers[i] = new FastStringReader(likeText[i]);
            }
            //LUCENE 4 UPGRADE this mapps the 3.6 behavior (only use the first field)
            Query mltQuery = mlt.like(moreLikeFields[0], readers);
            Queries.applyMinimumShouldMatch((BooleanQuery) mltQuery, minimumShouldMatch);
            bq.add(mltQuery, BooleanClause.Occur.SHOULD);
View Full Code Here


        return new YamlXContentGenerator(yamlFactory.createGenerator(writer));
    }

    @Override
    public XContentParser createParser(String content) throws IOException {
        return new YamlXContentParser(yamlFactory.createParser(new FastStringReader(content)));
    }
View Full Code Here

        return new SmileXContentGenerator(smileFactory.createGenerator(writer));
    }

    @Override
    public XContentParser createParser(String content) throws IOException {
        return new SmileXContentParser(smileFactory.createParser(new FastStringReader(content)));
    }
View Full Code Here

        return new CborXContentGenerator(cborFactory.createGenerator(writer));
    }

    @Override
    public XContentParser createParser(String content) throws IOException {
        return new CborXContentParser(cborFactory.createParser(new FastStringReader(content)));
    }
View Full Code Here

     *            a string representing the template to compile.
     * @return a compiled template object for later execution.
     * */
    public Object compile(String template) {
        /** Factory to generate Mustache objects from. */
        return (new JsonEscapingMustacheFactory()).compile(new FastStringReader(template), "query-template");
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.io.FastStringReader

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.