Commit Graph

783 Commits

Author SHA1 Message Date
Tim Brooks 5b1fbe5e6c Decouple BulkProcessor from client implementation (#23373)
This commit modifies the BulkProcessor to be decoupled from the
client implementation. Instead it just takes a
BiConsumer<BulkRequest, ActionListener<BulkResponse>> that executes
the BulkRequest.
2017-04-05 12:12:43 -05:00
Jason Tedor 3136ed1490 Rename random ASCII helper methods
This commit renames the random ASCII helper methods in ESTestCase. This
is because this method ultimately uses the random ASCII methods from
randomized runner, but these methods actually only produce random
strings generated from [a-zA-Z].

Relates #23886
2017-04-04 11:04:18 -04:00
Nik Everett 23b8b97275 Use include-tagged macro for high level client docs (#23438)
This should make it simpler to include example snippets from
tests.
2017-03-20 14:50:19 -04:00
Tanguy Leroux 15c936ec02 Correctly parse BulkItemResponse.Failure's status (#23432)
Today the status is lost when parsing back a BulkItemResponse.Failure. This commit changes the BulkItemResponse.Failure parsing method so that it correctly instantiates a failure with the parsed status instead of realying on the parsed ElasticsearchException (that always return an internal server error status).
2017-03-02 12:37:07 +01:00
Jason Tedor cda0d5f86a Fix checkstyle violation in delete docs test
This commit addresses a checkstyle violation in
DeleteDocumentationIT.java.
2017-03-01 08:22:02 -05:00
David Pilato dc80a1fa75 Bad rendering of docs 2017-03-01 13:33:12 +01:00
David Pilato 2629c9896c Missing dot and parenthesis 2017-03-01 13:21:37 +01:00
David Pilato ee4a17a0e2 Adapt per Nik's comments 2017-03-01 11:51:06 +01:00
David Pilato 6c526adaed Merge branch 'master' into doc/hlclient-delete 2017-03-01 11:26:36 +01:00
Christoph Büscher 3215ac11ec Add info method to High Level Rest client (#23350)
This commit adds support for an info() method to the High Level Rest
client that returns the cluster information usually obtained by performing a
`GET hostname:9200` request.
2017-02-27 11:43:56 +01:00
David Pilato c373ed102f Extract documentation from test code 2017-02-24 17:38:18 +01:00
David Pilato fd509d015c Merge remote-tracking branch 'origin/master'
# Conflicts:
#	client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
2017-02-24 11:52:56 +01:00
Luca Cavanna 7a96a38104 Add support for named xcontent parsers to high level REST client (#23328)
NamedXContentRegistry will be used by the high level REST client to parse aggregation responses, and any section whose class type depends on a json key. There are currently on entries in the standard registry, but soon aggs and most likely suggesters will be added. Also it is possible for subclasses to provide additional named xcontent parsers.
2017-02-24 11:46:59 +01:00
David Pilato 4ebc6dd0d0 Fix after last merge with master and apply last comments 2017-02-24 09:19:39 +01:00
David Pilato b680e62831 Merge branch 'master' into hlclient/add-delete-method
# Conflicts:
#	client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java
#	client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
#	client/rest-high-level/src/test/java/org/elasticsearch/client/CrudIT.java
#	client/rest-high-level/src/test/java/org/elasticsearch/client/RequestTests.java
2017-02-24 08:58:22 +01:00
Tanguy Leroux 7e3c06c55d Add BulkRequest support to High Level Rest client (#23312)
This commit adds support for BulkRequest execution in the High Level Rest client.
2017-02-23 16:37:26 +01:00
Tanguy Leroux 09734e7469 Add UpdateRequest support to High Level Rest client (#23266)
This commit adds support for UpdateRequest to the High Level Rest client
2017-02-22 11:54:54 +01:00
David Pilato 9bde68e4d6 delete and index tests can share some part of the code 2017-02-20 10:43:28 +01:00
David Pilato bf8241eec5 Remove createSampleDocument method and use the sync'ed index method 2017-02-20 10:33:19 +01:00
David Pilato 0ee74f9c28 Remove createSampleIndexRequest method and provide ids 2017-02-20 10:09:44 +01:00
David Pilato efa28e05f8 Check that we correctly propagate delete request parameters 2017-02-20 09:56:42 +01:00
David Pilato b2ec4c1f17 Remove a non needed comment 2017-02-20 09:36:47 +01:00
Jay Modi b234644035 Enforce Content-Type requirement on the rest layer and remove deprecated methods (#23146)
This commit enforces the requirement of Content-Type for the REST layer and removes the deprecated methods in transport
requests and their usages.

While doing this, it turns out that there are many places where *Entity classes are used from the apache http client
libraries and many of these usages did not specify the content type. The methods that do not specify a content type
explicitly have been added to forbidden apis to prevent more of these from entering our code base.

Relates #19388
2017-02-17 14:45:41 -05:00
David Pilato 5aa2ab3bbc Fix after 1st review
* Sort alphabetically method names
* Add javadoc link to the ref guide
* Add more tests about routing, version and version type
2017-02-17 11:46:02 +01:00
Jason Tedor 2925a81cc9 Fix REST spec for exists
A previous change aligned the handling of the GET document and HEAD
document APIs. This commit aligns the specification for these two APIs
as well, and fixes a failing test.

Relates #23196
2017-02-16 08:56:38 -05:00
Jason Tedor 3f07fcef64 Mark CrudIT#testExists as awaits fix
This commit marks the test CrudIT#testExists as awaiting a fix due to a
behavior change from aligning the GET and HEAD document APIs.
2017-02-15 22:56:52 -05:00
David Pilato 14f04905f8 Merge with master 2017-02-15 16:14:33 +01:00
David Pilato 0bbcd94827 Merge branch 'master' into hlclient/add-delete-method
# Conflicts:
#	client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java
#	client/rest-high-level/src/test/java/org/elasticsearch/client/CrudIT.java
2017-02-15 16:08:29 +01:00
David Pilato 7df1df24e8 Add delete API to the High Level Rest Client 2017-02-15 16:00:50 +01:00
Tanguy Leroux 86993ad759 Add Index API to High Level Rest Client (#23040)
This commit adds support for the Index API in the High Level Rest Client.
2017-02-15 13:53:41 +01:00
Luca Cavanna 3551106aa7 Add get/exists method to RestHighLevelClient (#22706)
This commit adds support for get and exists api to the high level Java Rest Client. It also adds the infrastructure for other methods to be added in the future.
2017-02-04 14:54:26 +01:00
javanna 0a6827a5cc Make RestHighLevelClient non final 2017-01-05 11:29:41 +01:00
javanna f0181b19f5 add REST high level client gradle submodule and first simple method
The RestHighLevelClient class takes as as an argument a low level client instance RestClient. The first method added is ping, which returns true if the call to HEAD / went ok and false if an IOException was thrown. Any other exception gets bubbled up.

There are two kinds of tests, a unit test (RestHighLevelClientTests) that verifies the interaction between high level and low level client, and an integration test (MainActionIT) which relies on an externally started es cluster to send requests to.
2017-01-05 10:55:47 +01:00