Package org.elasticsearch.common.xcontent

Examples of org.elasticsearch.common.xcontent.XContentBuilderString


            // All nodes track the same percentiles, so just choose a prototype to iterate
            if (prototypical != null) {
                for (Map.Entry<Double, Double> entry : prototypical.percentileValues().entrySet()) {
                    // Change back to integral value for display purposes
                    builder.startObject(new XContentBuilderString("percentile_" + entry.getKey().longValue()));

                    for (CompetitionNodeResult nodeResult : nodeResults) {
                        CompetitionIteration iteration = nodeResult.iterations().get(i);
                        if (iteration != null) {
                            Double value = iteration.percentileValues().get(entry.getKey());
View Full Code Here


        builder.field(Fields.STD_DEV, stdDeviation);
        builder.field(Fields.MILLIS_PER_HIT, millisPerHit);

        for (Map.Entry<Double, Double> entry : percentileValues.entrySet()) {
            // Change back to integral value for display purposes
            builder.field(new XContentBuilderString("percentile_" + entry.getKey().longValue()),
                    (entry.getValue().isNaN()) ? 0.0 : entry.getValue());
        }

        builder.endObject();
View Full Code Here

            client.prepareIndex("_river", rivername, "_fsstatus").setSource(xb).execute().actionGet();

            XContentBuilder builder = jsonBuilder();
            builder
                    .startObject()
                    .field(new XContentBuilderString("ok"), true)
                    .endObject();
            channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
        } catch (IOException e) {
            try {
                channel.sendResponse(new BytesRestResponse(channel, e));
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.xcontent.XContentBuilderString

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.