org.elasticsearch.action.explain
Class ExplainRequestBuilder

java.lang.Object
  extended by org.elasticsearch.action.support.BaseRequestBuilder<ExplainRequest,ExplainResponse>
      extended by org.elasticsearch.action.explain.ExplainRequestBuilder
All Implemented Interfaces:
ActionRequestBuilder<ExplainRequest,ExplainResponse>

public class ExplainRequestBuilder
extends BaseRequestBuilder<ExplainRequest,ExplainResponse>

A builder for ExplainRequest.


Field Summary
 
Fields inherited from class org.elasticsearch.action.support.BaseRequestBuilder
client, request
 
Constructor Summary
ExplainRequestBuilder(Client client, String index, String type, String id)
           
 
Method Summary
protected  void doExecute(ActionListener<ExplainResponse> listener)
           
 ExplainRequestBuilder operationThreaded(boolean threadedOperation)
          Sets whether the actual explain action should occur in a different thread if executed locally.
 ExplainRequestBuilder setFields(String... fields)
          Explicitly specify the fields that will be returned for the explained document.
 ExplainRequestBuilder setId(String id)
          Sets the id to get a score explanation for.
 ExplainRequestBuilder setIndex(String index)
          Sets the index to get a score explanation for.
 ExplainRequestBuilder setParent(String parent)
          Simple sets the routing.
 ExplainRequestBuilder setPreference(String preference)
          Sets the shard preference.
 ExplainRequestBuilder setQuery(BytesReference query)
          Sets the query to get a score explanation for.
 ExplainRequestBuilder setQuery(QueryBuilder query)
          Sets the query to get a score explanation for.
 ExplainRequestBuilder setRouting(String routing)
          Sets the routing for sharding.
 ExplainRequestBuilder setSource(BytesReference source, boolean unsafe)
          Sets the full source of the explain request (for example, wrapping an actual query).
 ExplainRequestBuilder setType(String type)
          Sets the type to get a score explanation for.
 
Methods inherited from class org.elasticsearch.action.support.BaseRequestBuilder
execute, execute, request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplainRequestBuilder

public ExplainRequestBuilder(Client client,
                             String index,
                             String type,
                             String id)
Method Detail

setIndex

public ExplainRequestBuilder setIndex(String index)
Sets the index to get a score explanation for.


setType

public ExplainRequestBuilder setType(String type)
Sets the type to get a score explanation for.


setId

public ExplainRequestBuilder setId(String id)
Sets the id to get a score explanation for.


setRouting

public ExplainRequestBuilder setRouting(String routing)
Sets the routing for sharding.


setParent

public ExplainRequestBuilder setParent(String parent)
Simple sets the routing. Since the parent is only used to get to the right shard.


setPreference

public ExplainRequestBuilder setPreference(String preference)
Sets the shard preference.


setQuery

public ExplainRequestBuilder setQuery(QueryBuilder query)
Sets the query to get a score explanation for.


setQuery

public ExplainRequestBuilder setQuery(BytesReference query)
Sets the query to get a score explanation for.


setFields

public ExplainRequestBuilder setFields(String... fields)
Explicitly specify the fields that will be returned for the explained document. By default, nothing is returned.


setSource

public ExplainRequestBuilder setSource(BytesReference source,
                                       boolean unsafe)
Sets the full source of the explain request (for example, wrapping an actual query).


operationThreaded

public ExplainRequestBuilder operationThreaded(boolean threadedOperation)
Sets whether the actual explain action should occur in a different thread if executed locally.


doExecute

protected void doExecute(ActionListener<ExplainResponse> listener)
Specified by:
doExecute in class BaseRequestBuilder<ExplainRequest,ExplainResponse>


Copyright © 2009-2012. All Rights Reserved.