|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.client.Requests
public class Requests
A handy one stop shop for creating requests (make sure to import static this class).
Field Summary | |
---|---|
static XContentType |
CONTENT_TYPE
The content type used to generate request builders (query / search). |
Constructor Summary | |
---|---|
Requests()
|
Method Summary | |
---|---|
static ClearIndicesCacheRequest |
clearIndicesCache(java.lang.String... indices)
Creates a clean indices cache request. |
static ClusterHealthRequest |
clusterHealth(java.lang.String... indices)
Creates a cluster health request. |
static ClusterStateRequest |
clusterState()
Creates a cluster state request. |
static CountRequest |
countRequest(java.lang.String... indices)
Creates a count request which counts the hits matched against a query. |
static CreateIndexRequest |
createIndexRequest(java.lang.String index)
Creates a create index request. |
static DeleteByQueryRequest |
deleteByQueryRequest(java.lang.String... indices)
Creates a delete by query request. |
static DeleteIndexRequest |
deleteIndexRequest(java.lang.String index)
Creates a delete index request. |
static DeleteRequest |
deleteRequest(java.lang.String index)
Creates a delete request against a specific index. |
static FlushRequest |
flushRequest(java.lang.String... indices)
Creates a flush indices request. |
static GatewaySnapshotRequest |
gatewaySnapshotRequest(java.lang.String... indices)
Creates a gateway snapshot indices request. |
static GetRequest |
getRequest(java.lang.String index)
Creates a get request to get the JSON source from an index based on a type and id. |
static IndicesAliasesRequest |
indexAliasesRequest()
Creates an index aliases request allowing to add and remove aliases. |
static IndexRequest |
indexRequest()
|
static IndexRequest |
indexRequest(java.lang.String index)
Create an index request against a specific index. |
static IndicesStatusRequest |
indicesStatus(java.lang.String... indices)
Creates an indices status request. |
static MoreLikeThisRequest |
moreLikeThisRequest(java.lang.String index)
More like this request represents a request to search for documents that are "like" the provided (fetched) document. |
static NodesInfoRequest |
nodesInfo()
Creates a nodes info request against all the nodes. |
static NodesInfoRequest |
nodesInfo(java.lang.String... nodesIds)
Creates a nodes info request against one or more nodes. |
static NodesRestartRequest |
nodesRestart()
Restarts all nodes in the cluster. |
static NodesRestartRequest |
nodesRestart(java.lang.String... nodesIds)
Restarts specific nodes in the cluster. |
static NodesShutdownRequest |
nodesShutdown()
Shuts down all nodes in the cluster. |
static NodesShutdownRequest |
nodesShutdown(java.lang.String... nodesIds)
Shuts down the specified nodes in the cluster. |
static NodesStatsRequest |
nodesStats(java.lang.String... nodesIds)
Creates a nodes stats request against one or more nodes. |
static OptimizeRequest |
optimizeRequest(java.lang.String... indices)
Creates an optimize request. |
static BroadcastPingRequest |
pingBroadcastRequest(java.lang.String... indices)
|
static ReplicationPingRequest |
pingReplicationRequest(java.lang.String... indices)
|
static SinglePingRequest |
pingSingleRequest(java.lang.String index)
|
static PutMappingRequest |
putMappingRequest(java.lang.String... indices)
Create a create mapping request against one or more indices. |
static RefreshRequest |
refreshRequest(java.lang.String... indices)
Creates a refresh indices request. |
static SearchRequest |
searchRequest(java.lang.String... indices)
Creates a search request against one or more indices. |
static SearchScrollRequest |
searchScrollRequest(java.lang.String scrollId)
Creates a search scroll request allowing to continue searching a previous search request. |
static TermsRequest |
termsRequest(java.lang.String... indices)
Terms request represent a request to get terms in one or more indices of specific fields and their document frequencies (in how many document each term exists). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static XContentType CONTENT_TYPE
Constructor Detail |
---|
public Requests()
Method Detail |
---|
public static IndexRequest indexRequest()
public static IndexRequest indexRequest(java.lang.String index)
IndexRequest.type(String)
must be
set as well and optionally the IndexRequest.id(String)
.
index
- The index name to index the request against
Client.index(org.elasticsearch.action.index.IndexRequest)
public static DeleteRequest deleteRequest(java.lang.String index)
DeleteRequest.type(String)
and
DeleteRequest.id(String)
must be set.
index
- The index name to delete from
Client.delete(org.elasticsearch.action.delete.DeleteRequest)
public static DeleteByQueryRequest deleteByQueryRequest(java.lang.String... indices)
QueryBuilder
(using QueryBuilders
).
indices
- The indices the delete by query against. Use null or _all to execute against all indices
Client.deleteByQuery(org.elasticsearch.action.deletebyquery.DeleteByQueryRequest)
public static GetRequest getRequest(java.lang.String index)
GetRequest.type(String)
and GetRequest.id(String)
must be set.
index
- The index to get the JSON source from
Client.get(org.elasticsearch.action.get.GetRequest)
public static CountRequest countRequest(java.lang.String... indices)
QueryBuilder
(using QueryBuilders
).
indices
- The indices the delete by query against. Use null or _all to execute against all indices
Client.count(org.elasticsearch.action.count.CountRequest)
public static TermsRequest termsRequest(java.lang.String... indices)
indices
- The indices the delete by query against. Use null or _all to execute against all indices
Client.terms(org.elasticsearch.action.terms.TermsRequest)
public static MoreLikeThisRequest moreLikeThisRequest(java.lang.String index)
index
- The index to load the document from
Client.moreLikeThis(org.elasticsearch.action.mlt.MoreLikeThisRequest)
public static SearchRequest searchRequest(java.lang.String... indices)
SearchSourceBuilder
.
indices
- The indices the delete by query against. Use null or _all to execute against all indices
Client.search(org.elasticsearch.action.search.SearchRequest)
public static SearchScrollRequest searchScrollRequest(java.lang.String scrollId)
scrollId
- The scroll id representing the scrollable search
Client.searchScroll(org.elasticsearch.action.search.SearchScrollRequest)
public static IndicesStatusRequest indicesStatus(java.lang.String... indices)
indices
- The indices the delete by query against. Use null or _all to execute against all indices
IndicesAdminClient.status(org.elasticsearch.action.admin.indices.status.IndicesStatusRequest)
public static CreateIndexRequest createIndexRequest(java.lang.String index)
index
- The index to create
IndicesAdminClient.create(org.elasticsearch.action.admin.indices.create.CreateIndexRequest)
public static DeleteIndexRequest deleteIndexRequest(java.lang.String index)
index
- The index to delete
IndicesAdminClient.delete(org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest)
public static PutMappingRequest putMappingRequest(java.lang.String... indices)
indices
- The indices the delete by query against. Use null or _all to execute against all indices
IndicesAdminClient.putMapping(org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest)
public static IndicesAliasesRequest indexAliasesRequest()
public static RefreshRequest refreshRequest(java.lang.String... indices)
indices
- The indices the delete by query against. Use null or _all to execute against all indices
IndicesAdminClient.refresh(org.elasticsearch.action.admin.indices.refresh.RefreshRequest)
public static FlushRequest flushRequest(java.lang.String... indices)
indices
- The indices the delete by query against. Use null or _all to execute against all indices
IndicesAdminClient.flush(org.elasticsearch.action.admin.indices.flush.FlushRequest)
public static OptimizeRequest optimizeRequest(java.lang.String... indices)
indices
- The indices to optimize. Use null or _all to execute against all indices
IndicesAdminClient.optimize(org.elasticsearch.action.admin.indices.optimize.OptimizeRequest)
public static GatewaySnapshotRequest gatewaySnapshotRequest(java.lang.String... indices)
indices
- The indices the gateway snapshot will be performed on. Use null or _all to execute against all indices
IndicesAdminClient.gatewaySnapshot(org.elasticsearch.action.admin.indices.gateway.snapshot.GatewaySnapshotRequest)
public static ClearIndicesCacheRequest clearIndicesCache(java.lang.String... indices)
indices
- The indices the gateway snapshot will be performed on. Use null or _all to execute against all indices
public static ClusterStateRequest clusterState()
ClusterAdminClient.state(org.elasticsearch.action.admin.cluster.state.ClusterStateRequest)
public static ClusterHealthRequest clusterHealth(java.lang.String... indices)
indices
- The indices to provide additional cluster health information for. Use null or _all to execute against all indices
ClusterAdminClient.health(org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest)
public static NodesInfoRequest nodesInfo()
ClusterAdminClient.nodesInfo(org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest)
public static NodesInfoRequest nodesInfo(java.lang.String... nodesIds)
nodesIds
- The nodes ids to get the status for
ClusterAdminClient.nodesStats(org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequest)
public static NodesStatsRequest nodesStats(java.lang.String... nodesIds)
nodesIds
- The nodes ids to get the stats for
ClusterAdminClient.nodesStats(org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequest)
public static NodesShutdownRequest nodesShutdown()
public static NodesShutdownRequest nodesShutdown(java.lang.String... nodesIds)
nodesIds
- The nodes ids to get the status for
ClusterAdminClient.nodesShutdown(org.elasticsearch.action.admin.cluster.node.shutdown.NodesShutdownRequest)
public static NodesRestartRequest nodesRestart()
public static NodesRestartRequest nodesRestart(java.lang.String... nodesIds)
nodesIds
- The nodes ids to restart
ClusterAdminClient.nodesRestart(org.elasticsearch.action.admin.cluster.node.restart.NodesRestartRequest)
public static SinglePingRequest pingSingleRequest(java.lang.String index)
public static BroadcastPingRequest pingBroadcastRequest(java.lang.String... indices)
public static ReplicationPingRequest pingReplicationRequest(java.lang.String... indices)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |