public abstract class AbstractClient extends Object implements Client
CLIENT_TYPE_SETTING
Constructor and Description |
---|
AbstractClient() |
Modifier and Type | Method and Description |
---|---|
ActionFuture<BulkResponse> |
bulk(BulkRequest request)
Executes a bulk of index / delete operations.
|
void |
bulk(BulkRequest request,
ActionListener<BulkResponse> listener)
Executes a bulk of index / delete operations.
|
ActionFuture<ClearScrollResponse> |
clearScroll(ClearScrollRequest request)
Clears the search contexts associated with specified scroll ids.
|
void |
clearScroll(ClearScrollRequest request,
ActionListener<ClearScrollResponse> listener)
Clears the search contexts associated with specified scroll ids.
|
ActionFuture<CountResponse> |
count(CountRequest request)
A count of all the documents matching a specific query.
|
void |
count(CountRequest request,
ActionListener<CountResponse> listener)
A count of all the documents matching a specific query.
|
ActionFuture<DeleteResponse> |
delete(DeleteRequest request)
Deletes a document from the index based on the index, type and id.
|
void |
delete(DeleteRequest request,
ActionListener<DeleteResponse> listener)
Deletes a document from the index based on the index, type and id.
|
ActionFuture<DeleteByQueryResponse> |
deleteByQuery(DeleteByQueryRequest request)
Deletes all documents from one or more indices based on a query.
|
void |
deleteByQuery(DeleteByQueryRequest request,
ActionListener<DeleteByQueryResponse> listener)
Deletes all documents from one or more indices based on a query.
|
ActionFuture<DeleteIndexedScriptResponse> |
deleteIndexedScript(DeleteIndexedScriptRequest request)
Delete an indexed script
|
void |
deleteIndexedScript(DeleteIndexedScriptRequest request,
ActionListener<DeleteIndexedScriptResponse> listener)
delete an indexed script
|
ActionFuture<ExistsResponse> |
exists(ExistsRequest request)
Checks existence of any documents matching a specific query.
|
void |
exists(ExistsRequest request,
ActionListener<ExistsResponse> listener)
Checks existence of any documents matching a specific query.
|
ActionFuture<ExplainResponse> |
explain(ExplainRequest request)
Computes a score explanation for the specified request.
|
void |
explain(ExplainRequest request,
ActionListener<ExplainResponse> listener)
Computes a score explanation for the specified request.
|
ActionFuture<GetResponse> |
get(GetRequest request)
Gets the document that was indexed from an index with a type and id.
|
void |
get(GetRequest request,
ActionListener<GetResponse> listener)
Gets the document that was indexed from an index with a type and id.
|
ActionFuture<GetIndexedScriptResponse> |
getIndexedScript(GetIndexedScriptRequest request)
Gets the document that was indexed from an index with a type and id.
|
void |
getIndexedScript(GetIndexedScriptRequest request,
ActionListener<GetIndexedScriptResponse> listener)
Get an indexed script
|
ActionFuture<IndexResponse> |
index(IndexRequest request)
Index a JSON source associated with a given index and type.
|
void |
index(IndexRequest request,
ActionListener<IndexResponse> listener)
Index a document associated with a given index and type.
|
ActionFuture<SearchResponse> |
moreLikeThis(MoreLikeThisRequest request)
A more like this action to search for documents that are "like" a specific document.
|
void |
moreLikeThis(MoreLikeThisRequest request,
ActionListener<SearchResponse> listener)
A more like this action to search for documents that are "like" a specific document.
|
ActionFuture<MultiGetResponse> |
multiGet(MultiGetRequest request)
Multi get documents.
|
void |
multiGet(MultiGetRequest request,
ActionListener<MultiGetResponse> listener)
Multi get documents.
|
ActionFuture<MultiPercolateResponse> |
multiPercolate(MultiPercolateRequest request)
Performs multiple percolate requests.
|
void |
multiPercolate(MultiPercolateRequest request,
ActionListener<MultiPercolateResponse> listener)
Performs multiple percolate requests.
|
ActionFuture<MultiSearchResponse> |
multiSearch(MultiSearchRequest request)
Performs multiple search requests.
|
void |
multiSearch(MultiSearchRequest request,
ActionListener<MultiSearchResponse> listener)
Performs multiple search requests.
|
ActionFuture<MultiTermVectorsResponse> |
multiTermVectors(MultiTermVectorsRequest request)
Multi get term vectors.
|
void |
multiTermVectors(MultiTermVectorsRequest request,
ActionListener<MultiTermVectorsResponse> listener)
Multi get term vectors.
|
ActionFuture<PercolateResponse> |
percolate(PercolateRequest request)
Percolates a request returning the matches documents.
|
void |
percolate(PercolateRequest request,
ActionListener<PercolateResponse> listener)
Percolates a request returning the matches documents.
|
BulkRequestBuilder |
prepareBulk()
Executes a bulk of index / delete operations.
|
ClearScrollRequestBuilder |
prepareClearScroll()
Clears the search contexts associated with specified scroll ids.
|
CountRequestBuilder |
prepareCount(String... indices)
A count of all the documents matching a specific query.
|
DeleteRequestBuilder |
prepareDelete()
Deletes a document from the index based on the index, type and id.
|
DeleteRequestBuilder |
prepareDelete(String index,
String type,
String id)
Deletes a document from the index based on the index, type and id.
|
DeleteByQueryRequestBuilder |
prepareDeleteByQuery(String... indices)
Deletes all documents from one or more indices based on a query.
|
DeleteIndexedScriptRequestBuilder |
prepareDeleteIndexedScript()
Delete an indexed script
|
DeleteIndexedScriptRequestBuilder |
prepareDeleteIndexedScript(String scriptLang,
String id)
Delete an indexed script
|
<Request extends ActionRequest,Response extends ActionResponse,RequestBuilder extends ActionRequestBuilder<Request,Response,RequestBuilder,Client>> |
prepareExecute(Action<Request,Response,RequestBuilder,Client> action)
Prepares a request builder to execute, specified by
Action . |
ExistsRequestBuilder |
prepareExists(String... indices)
Checks existence of any documents matching a specific query.
|
ExplainRequestBuilder |
prepareExplain(String index,
String type,
String id)
Computes a score explanation for the specified request.
|
GetRequestBuilder |
prepareGet()
Gets the document that was indexed from an index with a type and id.
|
GetRequestBuilder |
prepareGet(String index,
String type,
String id)
Gets the document that was indexed from an index with a type (optional) and id.
|
GetIndexedScriptRequestBuilder |
prepareGetIndexedScript()
Get an indexed script
|
GetIndexedScriptRequestBuilder |
prepareGetIndexedScript(String scriptLang,
String id)
Get the indexed script
|
IndexRequestBuilder |
prepareIndex()
Index a document associated with a given index and type.
|
IndexRequestBuilder |
prepareIndex(String index,
String type)
Index a document associated with a given index and type.
|
IndexRequestBuilder |
prepareIndex(String index,
String type,
String id)
Index a document associated with a given index and type.
|
MoreLikeThisRequestBuilder |
prepareMoreLikeThis(String index,
String type,
String id)
A more like this action to search for documents that are "like" a specific document.
|
MultiGetRequestBuilder |
prepareMultiGet()
Multi get documents.
|
MultiPercolateRequestBuilder |
prepareMultiPercolate()
Performs multiple percolate requests.
|
MultiSearchRequestBuilder |
prepareMultiSearch()
Performs multiple search requests.
|
MultiTermVectorsRequestBuilder |
prepareMultiTermVectors()
Multi get term vectors.
|
PercolateRequestBuilder |
preparePercolate()
Percolates a request returning the matches documents.
|
PutIndexedScriptRequestBuilder |
preparePutIndexedScript()
Put an indexed script
|
PutIndexedScriptRequestBuilder |
preparePutIndexedScript(String scriptLang,
String id,
String source)
Put the indexed script
|
SearchRequestBuilder |
prepareSearch(String... indices)
Search across one or more indices and one or more types with a query.
|
SearchScrollRequestBuilder |
prepareSearchScroll(String scrollId)
A search scroll request to continue searching a previous scrollable search request.
|
SuggestRequestBuilder |
prepareSuggest(String... indices)
Suggestions matching a specific phrase.
|
TermVectorRequestBuilder |
prepareTermVector()
Builder for the term vector request.
|
TermVectorRequestBuilder |
prepareTermVector(String index,
String type,
String id)
Builder for the term vector request.
|
UpdateRequestBuilder |
prepareUpdate()
Updates a document based on a script.
|
UpdateRequestBuilder |
prepareUpdate(String index,
String type,
String id)
Updates a document based on a script.
|
ActionFuture<PutIndexedScriptResponse> |
putIndexedScript(PutIndexedScriptRequest request)
Put an indexed script
|
void |
putIndexedScript(PutIndexedScriptRequest request,
ActionListener<PutIndexedScriptResponse> listener)
Put an indexed script
|
ActionFuture<SearchResponse> |
search(SearchRequest request)
Search across one or more indices and one or more types with a query.
|
void |
search(SearchRequest request,
ActionListener<SearchResponse> listener)
Search across one or more indices and one or more types with a query.
|
ActionFuture<SearchResponse> |
searchScroll(SearchScrollRequest request)
A search scroll request to continue searching a previous scrollable search request.
|
void |
searchScroll(SearchScrollRequest request,
ActionListener<SearchResponse> listener)
A search scroll request to continue searching a previous scrollable search request.
|
ActionFuture<SuggestResponse> |
suggest(SuggestRequest request)
Suggestion matching a specific phrase.
|
void |
suggest(SuggestRequest request,
ActionListener<SuggestResponse> listener)
Suggestions matching a specific phrase.
|
ActionFuture<TermVectorResponse> |
termVector(TermVectorRequest request)
An action that returns the term vectors for a specific document.
|
void |
termVector(TermVectorRequest request,
ActionListener<TermVectorResponse> listener)
An action that returns the term vectors for a specific document.
|
ActionFuture<UpdateResponse> |
update(UpdateRequest request)
Updates a document based on a script.
|
void |
update(UpdateRequest request,
ActionListener<UpdateResponse> listener)
Updates a document based on a script.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, execute, threadPool
close
public <Request extends ActionRequest,Response extends ActionResponse,RequestBuilder extends ActionRequestBuilder<Request,Response,RequestBuilder,Client>> RequestBuilder prepareExecute(Action<Request,Response,RequestBuilder,Client> action)
ElasticsearchClient
Action
.prepareExecute
in interface ElasticsearchClient<Client>
Request
- The request type.Response
- The response type.RequestBuilder
- The request builder.action
- The action type to execute.public ActionFuture<IndexResponse> index(IndexRequest request)
Client
The id is optional, if it is not provided, one will be generated automatically.
index
in interface Client
request
- The index requestRequests.indexRequest(String)
public void index(IndexRequest request, ActionListener<IndexResponse> listener)
Client
The id is optional, if it is not provided, one will be generated automatically.
index
in interface Client
request
- The index requestlistener
- A listener to be notified with a resultRequests.indexRequest(String)
public IndexRequestBuilder prepareIndex()
Client
The id is optional, if it is not provided, one will be generated automatically.
prepareIndex
in interface Client
public IndexRequestBuilder prepareIndex(String index, String type)
Client
The id is optional, if it is not provided, one will be generated automatically.
prepareIndex
in interface Client
index
- The index to index the document totype
- The type to index the document topublic IndexRequestBuilder prepareIndex(String index, String type, @Nullable String id)
Client
The id is optional, if it is not provided, one will be generated automatically.
prepareIndex
in interface Client
index
- The index to index the document totype
- The type to index the document toid
- The id of the documentpublic ActionFuture<UpdateResponse> update(UpdateRequest request)
Client
public void update(UpdateRequest request, ActionListener<UpdateResponse> listener)
Client
public UpdateRequestBuilder prepareUpdate()
Client
prepareUpdate
in interface Client
public UpdateRequestBuilder prepareUpdate(String index, String type, String id)
Client
prepareUpdate
in interface Client
public ActionFuture<DeleteResponse> delete(DeleteRequest request)
Client
delete
in interface Client
request
- The delete requestRequests.deleteRequest(String)
public void delete(DeleteRequest request, ActionListener<DeleteResponse> listener)
Client
delete
in interface Client
request
- The delete requestlistener
- A listener to be notified with a resultRequests.deleteRequest(String)
public DeleteRequestBuilder prepareDelete()
Client
prepareDelete
in interface Client
public DeleteRequestBuilder prepareDelete(String index, String type, String id)
Client
prepareDelete
in interface Client
index
- The index to delete the document fromtype
- The type of the document to deleteid
- The id of the document to deletepublic ActionFuture<BulkResponse> bulk(BulkRequest request)
Client
bulk
in interface Client
request
- The bulk requestRequests.bulkRequest()
public void bulk(BulkRequest request, ActionListener<BulkResponse> listener)
Client
bulk
in interface Client
request
- The bulk requestlistener
- A listener to be notified with a resultRequests.bulkRequest()
public BulkRequestBuilder prepareBulk()
Client
prepareBulk
in interface Client
public ActionFuture<DeleteByQueryResponse> deleteByQuery(DeleteByQueryRequest request)
Client
deleteByQuery
in interface Client
request
- The delete by query requestRequests.deleteByQueryRequest(String...)
public void deleteByQuery(DeleteByQueryRequest request, ActionListener<DeleteByQueryResponse> listener)
Client
deleteByQuery
in interface Client
request
- The delete by query requestlistener
- A listener to be notified with a resultRequests.deleteByQueryRequest(String...)
public DeleteByQueryRequestBuilder prepareDeleteByQuery(String... indices)
Client
prepareDeleteByQuery
in interface Client
public ActionFuture<GetResponse> get(GetRequest request)
Client
get
in interface Client
request
- The get requestRequests.getRequest(String)
public void get(GetRequest request, ActionListener<GetResponse> listener)
Client
get
in interface Client
request
- The get requestlistener
- A listener to be notified with a resultRequests.getRequest(String)
public GetRequestBuilder prepareGet()
Client
prepareGet
in interface Client
public GetRequestBuilder prepareGet(String index, String type, String id)
Client
prepareGet
in interface Client
public ActionFuture<GetIndexedScriptResponse> getIndexedScript(GetIndexedScriptRequest request)
Client
getIndexedScript
in interface Client
request
- The get requestRequests.getRequest(String)
public void getIndexedScript(GetIndexedScriptRequest request, ActionListener<GetIndexedScriptResponse> listener)
Client
getIndexedScript
in interface Client
public GetIndexedScriptRequestBuilder prepareGetIndexedScript()
Client
prepareGetIndexedScript
in interface Client
public GetIndexedScriptRequestBuilder prepareGetIndexedScript(String scriptLang, String id)
Client
prepareGetIndexedScript
in interface Client
public PutIndexedScriptRequestBuilder preparePutIndexedScript()
preparePutIndexedScript
in interface Client
public PutIndexedScriptRequestBuilder preparePutIndexedScript(@Nullable String scriptLang, String id, String source)
preparePutIndexedScript
in interface Client
scriptLang
- id
- source
- public void putIndexedScript(PutIndexedScriptRequest request, ActionListener<PutIndexedScriptResponse> listener)
putIndexedScript
in interface Client
request
- listener
- public ActionFuture<PutIndexedScriptResponse> putIndexedScript(PutIndexedScriptRequest request)
putIndexedScript
in interface Client
request
- The put requestpublic void deleteIndexedScript(DeleteIndexedScriptRequest request, ActionListener<DeleteIndexedScriptResponse> listener)
deleteIndexedScript
in interface Client
request
- listener
- public ActionFuture<DeleteIndexedScriptResponse> deleteIndexedScript(DeleteIndexedScriptRequest request)
deleteIndexedScript
in interface Client
request
- The put requestpublic DeleteIndexedScriptRequestBuilder prepareDeleteIndexedScript()
prepareDeleteIndexedScript
in interface Client
public DeleteIndexedScriptRequestBuilder prepareDeleteIndexedScript(@Nullable String scriptLang, String id)
prepareDeleteIndexedScript
in interface Client
scriptLang
- id
- public ActionFuture<MultiGetResponse> multiGet(MultiGetRequest request)
Client
public void multiGet(MultiGetRequest request, ActionListener<MultiGetResponse> listener)
Client
public MultiGetRequestBuilder prepareMultiGet()
Client
prepareMultiGet
in interface Client
public ActionFuture<SearchResponse> search(SearchRequest request)
Client
search
in interface Client
request
- The search requestRequests.searchRequest(String...)
public void search(SearchRequest request, ActionListener<SearchResponse> listener)
Client
search
in interface Client
request
- The search requestlistener
- A listener to be notified of the resultRequests.searchRequest(String...)
public SearchRequestBuilder prepareSearch(String... indices)
Client
prepareSearch
in interface Client
public ActionFuture<SearchResponse> searchScroll(SearchScrollRequest request)
Client
searchScroll
in interface Client
request
- The search scroll requestRequests.searchScrollRequest(String)
public void searchScroll(SearchScrollRequest request, ActionListener<SearchResponse> listener)
Client
searchScroll
in interface Client
request
- The search scroll requestlistener
- A listener to be notified of the resultRequests.searchScrollRequest(String)
public SearchScrollRequestBuilder prepareSearchScroll(String scrollId)
Client
prepareSearchScroll
in interface Client
public ActionFuture<MultiSearchResponse> multiSearch(MultiSearchRequest request)
Client
multiSearch
in interface Client
public void multiSearch(MultiSearchRequest request, ActionListener<MultiSearchResponse> listener)
Client
multiSearch
in interface Client
public MultiSearchRequestBuilder prepareMultiSearch()
Client
prepareMultiSearch
in interface Client
public ActionFuture<CountResponse> count(CountRequest request)
Client
count
in interface Client
request
- The count requestRequests.countRequest(String...)
public void count(CountRequest request, ActionListener<CountResponse> listener)
Client
count
in interface Client
request
- The count requestlistener
- A listener to be notified of the resultRequests.countRequest(String...)
public CountRequestBuilder prepareCount(String... indices)
Client
prepareCount
in interface Client
public ActionFuture<ExistsResponse> exists(ExistsRequest request)
Client
exists
in interface Client
request
- The exists requestRequests.existsRequest(String...)
public void exists(ExistsRequest request, ActionListener<ExistsResponse> listener)
Client
exists
in interface Client
request
- The exists requestlistener
- A listener to be notified of the resultRequests.existsRequest(String...)
public ExistsRequestBuilder prepareExists(String... indices)
Client
prepareExists
in interface Client
public ActionFuture<SuggestResponse> suggest(SuggestRequest request)
Client
suggest
in interface Client
request
- The suggest requestRequests.suggestRequest(String...)
public void suggest(SuggestRequest request, ActionListener<SuggestResponse> listener)
Client
suggest
in interface Client
request
- The suggest requestlistener
- A listener to be notified of the resultRequests.suggestRequest(String...)
public SuggestRequestBuilder prepareSuggest(String... indices)
Client
prepareSuggest
in interface Client
public ActionFuture<SearchResponse> moreLikeThis(MoreLikeThisRequest request)
Client
moreLikeThis
in interface Client
request
- The more like this requestpublic void moreLikeThis(MoreLikeThisRequest request, ActionListener<SearchResponse> listener)
Client
moreLikeThis
in interface Client
request
- The more like this requestlistener
- A listener to be notified of the resultpublic MoreLikeThisRequestBuilder prepareMoreLikeThis(String index, String type, String id)
Client
prepareMoreLikeThis
in interface Client
index
- The index to load the document fromtype
- The type of the documentid
- The id of the documentpublic ActionFuture<TermVectorResponse> termVector(TermVectorRequest request)
Client
termVector
in interface Client
request
- The term vector requestpublic void termVector(TermVectorRequest request, ActionListener<TermVectorResponse> listener)
Client
termVector
in interface Client
request
- The term vector requestpublic TermVectorRequestBuilder prepareTermVector()
Client
prepareTermVector
in interface Client
public TermVectorRequestBuilder prepareTermVector(String index, String type, String id)
Client
prepareTermVector
in interface Client
index
- The index to load the document fromtype
- The type of the documentid
- The id of the documentpublic ActionFuture<MultiTermVectorsResponse> multiTermVectors(MultiTermVectorsRequest request)
Client
multiTermVectors
in interface Client
public void multiTermVectors(MultiTermVectorsRequest request, ActionListener<MultiTermVectorsResponse> listener)
Client
multiTermVectors
in interface Client
public MultiTermVectorsRequestBuilder prepareMultiTermVectors()
Client
prepareMultiTermVectors
in interface Client
public ActionFuture<PercolateResponse> percolate(PercolateRequest request)
Client
public void percolate(PercolateRequest request, ActionListener<PercolateResponse> listener)
Client
public PercolateRequestBuilder preparePercolate()
Client
preparePercolate
in interface Client
public MultiPercolateRequestBuilder prepareMultiPercolate()
Client
prepareMultiPercolate
in interface Client
public void multiPercolate(MultiPercolateRequest request, ActionListener<MultiPercolateResponse> listener)
Client
multiPercolate
in interface Client
public ActionFuture<MultiPercolateResponse> multiPercolate(MultiPercolateRequest request)
Client
multiPercolate
in interface Client
public ExplainRequestBuilder prepareExplain(String index, String type, String id)
Client
prepareExplain
in interface Client
index
- The index this explain is targeted fortype
- The type this explain is targeted forid
- The document identifier this explain is targeted forpublic ActionFuture<ExplainResponse> explain(ExplainRequest request)
Client
public void explain(ExplainRequest request, ActionListener<ExplainResponse> listener)
Client
public void clearScroll(ClearScrollRequest request, ActionListener<ClearScrollResponse> listener)
Client
clearScroll
in interface Client
public ActionFuture<ClearScrollResponse> clearScroll(ClearScrollRequest request)
Client
clearScroll
in interface Client
public ClearScrollRequestBuilder prepareClearScroll()
Client
prepareClearScroll
in interface Client
Copyright © 2009–2015. All rights reserved.