Package org.elasticsearch.action.explain

Examples of org.elasticsearch.action.explain.ExplainRequest.index()


        client.explain(explainRequest, new RestBuilderListener<ExplainResponse>(channel) {
            @Override
            public RestResponse buildResponse(ExplainResponse response, XContentBuilder builder) throws Exception {
                builder.startObject();
                //null checks for bw comp, since we only added in 1.4 index, type and id to ExplainResponse
                builder.field(Fields._INDEX, response.getIndex() != null ? response.getIndex() : explainRequest.index())
                        .field(Fields._TYPE, response.getType() != null ? response.getType() : explainRequest.type())
                        .field(Fields._ID, response.getId() != null ? response.getId() : explainRequest.id())
                        .field(Fields.MATCHED, response.isMatch());

                if (response.hasExplanation()) {
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.