|
|||||||||
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). |
static XContentType |
INDEX_CONTENT_TYPE
The default content type to use to generate source documents when indexing. |
Constructor Summary | |
---|---|
Requests()
|
Method Summary | |
---|---|
static BulkRequest |
bulkRequest()
Creats a new bulk request. |
static ClearIndicesCacheRequest |
clearIndicesCacheRequest(java.lang.String... indices)
Creates a clean indices cache request. |
static CloseIndexRequest |
closeIndexRequest(java.lang.String index)
Creates a close index request. |
static ClusterHealthRequest |
clusterHealthRequest(java.lang.String... indices)
Creates a cluster health request. |
static ClusterRerouteRequest |
clusterRerouteRequest()
|
static ClusterStateRequest |
clusterStateRequest()
Creates a cluster state request. |
static ClusterUpdateSettingsRequest |
clusterUpdateSettingsRequest()
|
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 DeleteMappingRequest |
deleteMappingRequest(java.lang.String... indices)
Deletes mapping (and all its data) from one or more indices. |
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 IndicesExistsRequest |
indicesExistsRequest(java.lang.String... indices)
Creates an indices exists request. |
static IndicesSegmentsRequest |
indicesSegmentsRequest(java.lang.String... indices)
|
static IndicesStatusRequest |
indicesStatusRequest(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 |
nodesInfoRequest()
Creates a nodes info request against all the nodes. |
static NodesInfoRequest |
nodesInfoRequest(java.lang.String... nodesIds)
Creates a nodes info request against one or more nodes. |
static NodesRestartRequest |
nodesRestartRequest()
Restarts all nodes in the cluster. |
static NodesRestartRequest |
nodesRestartRequest(java.lang.String... nodesIds)
Restarts specific nodes in the cluster. |
static NodesShutdownRequest |
nodesShutdownRequest()
Shuts down all nodes in the cluster. |
static NodesShutdownRequest |
nodesShutdownRequest(java.lang.String... nodesIds)
Shuts down the specified nodes in the cluster. |
static NodesStatsRequest |
nodesStatsRequest(java.lang.String... nodesIds)
Creates a nodes stats request against one or more nodes. |
static OpenIndexRequest |
openIndexRequest(java.lang.String index)
Creates an open index request. |
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 UpdateSettingsRequest |
updateSettingsRequest(java.lang.String... indices)
A request to update indices settings. |
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
public static XContentType INDEX_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 BulkRequest bulkRequest()
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 to count matched documents against a query. Use null or _all to execute against all indices
Client.count(org.elasticsearch.action.count.CountRequest)
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 to search 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 indicesStatusRequest(java.lang.String... indices)
indices
- The indices to query status about. Use null or _all to execute against all indices
IndicesAdminClient.status(org.elasticsearch.action.admin.indices.status.IndicesStatusRequest)
public static IndicesSegmentsRequest indicesSegmentsRequest(java.lang.String... indices)
public static IndicesExistsRequest indicesExistsRequest(java.lang.String... indices)
indices
- The indices to check if they exists or not.
IndicesAdminClient.exists(org.elasticsearch.action.admin.indices.exists.IndicesExistsRequest)
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 CloseIndexRequest closeIndexRequest(java.lang.String index)
index
- The index to close
IndicesAdminClient.close(org.elasticsearch.action.admin.indices.close.CloseIndexRequest)
public static OpenIndexRequest openIndexRequest(java.lang.String index)
index
- The index to open
IndicesAdminClient.open(org.elasticsearch.action.admin.indices.open.OpenIndexRequest)
public static PutMappingRequest putMappingRequest(java.lang.String... indices)
indices
- The indices to create mapping. Use null or _all to execute against all indices
IndicesAdminClient.putMapping(org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest)
public static DeleteMappingRequest deleteMappingRequest(java.lang.String... indices)
indices
- The indices the mapping will be deleted from. Use null or _all to execute against all indices
IndicesAdminClient.deleteMapping(org.elasticsearch.action.admin.indices.mapping.delete.DeleteMappingRequest)
public static IndicesAliasesRequest indexAliasesRequest()
public static RefreshRequest refreshRequest(java.lang.String... indices)
indices
- The indices to refresh. 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 to flush. 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 clearIndicesCacheRequest(java.lang.String... indices)
indices
- The indices to clean their caches. Use null or _all to execute against all indices
public static UpdateSettingsRequest updateSettingsRequest(java.lang.String... indices)
indices
- The indices to update the settings for. Use null or _all to executed against all indices.
public static ClusterStateRequest clusterStateRequest()
ClusterAdminClient.state(org.elasticsearch.action.admin.cluster.state.ClusterStateRequest)
public static ClusterRerouteRequest clusterRerouteRequest()
public static ClusterUpdateSettingsRequest clusterUpdateSettingsRequest()
public static ClusterHealthRequest clusterHealthRequest(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 nodesInfoRequest()
ClusterAdminClient.nodesInfo(org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest)
public static NodesInfoRequest nodesInfoRequest(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 nodesStatsRequest(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 nodesShutdownRequest()
public static NodesShutdownRequest nodesShutdownRequest(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 nodesRestartRequest()
public static NodesRestartRequest nodesRestartRequest(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 |