org.elasticsearch.action.admin.indices.validate.query
Class ValidateQueryRequest

java.lang.Object
  extended by org.elasticsearch.action.support.broadcast.BroadcastOperationRequest
      extended by org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest
All Implemented Interfaces:
ActionRequest, Streamable

public class ValidateQueryRequest
extends BroadcastOperationRequest

A request to validate a specific query.

The request requires the query source to be set either using query(org.elasticsearch.index.query.QueryBuilder), or query(byte[]).


Field Summary
 
Fields inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest
indices
 
Constructor Summary
ValidateQueryRequest(String... indices)
          Constructs a new validate request against the provided indices.
 
Method Summary
protected  void beforeStart()
           
 boolean explain()
          Indicates if detailed information about query is requested
 void explain(boolean explain)
          Indicate if detailed information about query is requested
 ValidateQueryRequest indices(String... indices)
           
 ValidateQueryRequest listenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 ValidateQueryRequest operationThreading(BroadcastOperationThreading operationThreading)
          Controls the operation threading model.
 ValidateQueryRequest query(byte[] querySource)
          The query source to validate.
 ValidateQueryRequest query(byte[] querySource, int offset, int length, boolean unsafe)
          The query source to validate.
 ValidateQueryRequest query(BytesReference querySource, boolean unsafe)
          The query source to validate.
 ValidateQueryRequest query(Map querySource)
          The query source to execute in the form of a map.
 ValidateQueryRequest query(QueryBuilder queryBuilder)
          The query source to execute.
 ValidateQueryRequest query(String querySource)
          The query source to validate.
 ValidateQueryRequest query(XContentBuilder builder)
           
 void readFrom(StreamInput in)
           
 String toString()
           
 ValidateQueryRequest types(String... types)
          The types of documents the query will run against.
 ActionRequestValidationException validate()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest
beforeLocalFork, ignoreIndices, ignoreIndices, indices, listenerThreaded, operationThreading, operationThreading
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidateQueryRequest

public ValidateQueryRequest(String... indices)
Constructs a new validate request against the provided indices. No indices provided means it will run against all indices.

Method Detail

validate

public ActionRequestValidationException validate()
Specified by:
validate in interface ActionRequest
Overrides:
validate in class BroadcastOperationRequest

operationThreading

public ValidateQueryRequest operationThreading(BroadcastOperationThreading operationThreading)
Controls the operation threading model.

Overrides:
operationThreading in class BroadcastOperationRequest

beforeStart

protected void beforeStart()
Overrides:
beforeStart in class BroadcastOperationRequest

listenerThreaded

public ValidateQueryRequest listenerThreaded(boolean threadedListener)
Should the listener be called on a separate thread if needed.

Specified by:
listenerThreaded in interface ActionRequest
Overrides:
listenerThreaded in class BroadcastOperationRequest

indices

public ValidateQueryRequest indices(String... indices)
Overrides:
indices in class BroadcastOperationRequest

query

@Required
public ValidateQueryRequest query(QueryBuilder queryBuilder)
The query source to execute.

See Also:
QueryBuilders

query

@Required
public ValidateQueryRequest query(Map querySource)
The query source to execute in the form of a map.


query

@Required
public ValidateQueryRequest query(XContentBuilder builder)

query

@Required
public ValidateQueryRequest query(String querySource)
The query source to validate. It is preferable to use either query(byte[]) or query(org.elasticsearch.index.query.QueryBuilder).


query

@Required
public ValidateQueryRequest query(byte[] querySource)
The query source to validate.


query

@Required
public ValidateQueryRequest query(byte[] querySource,
                                           int offset,
                                           int length,
                                           boolean unsafe)
The query source to validate.


query

@Required
public ValidateQueryRequest query(BytesReference querySource,
                                           boolean unsafe)
The query source to validate.


types

public ValidateQueryRequest types(String... types)
The types of documents the query will run against. Defaults to all types.


explain

public void explain(boolean explain)
Indicate if detailed information about query is requested


explain

public boolean explain()
Indicates if detailed information about query is requested


readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Overrides:
readFrom in class BroadcastOperationRequest
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Overrides:
writeTo in class BroadcastOperationRequest
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012. All Rights Reserved.