-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Closed
Labels
Description
This is a meta issue to track work that's being done on the Java High Level REST Client.
See https://www.elastic.co/blog/state-of-the-official-elasticsearch-java-clients to know more about the state of the official Java clients and the plan moving forward.
The RestHighLevelClient
will allow to reuse the same request objects (ActionRequest
subclasses) and responses (ActionResponse
subclasses) as the current transport client. The client object though will not be the same and the new one will not implement the current Client
interface (see #9201 to know why).
The Java High Level REST Client
label can be followed to track progress on the high level REST client, the following are the apis that we want to support for its first release:
- ping api (
HEAD localhost:9200/
)info api (GET localhost:9200/
)get apiindex apiupdate apidelete apibulk apisearch api- hits
- suggest
- profile
- aggregations
- single bucket (Add parsing for single bucket aggregations #24564)
- filter
- children
- nested
- reverse nested
- missing
- global
- sampler
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - multi bucket
- adjacency matrix (Add parsing for InternalAdjacencyMatrix aggregation #24700)
- date range (Add parsing methods to Range aggregations #24583)
- binary range (Add parsing method for binary range aggregation #24706)
- geohash grid (Add parsing method to GeoHashGrid aggregation #24589)
- geodistance (Add parsing methods to Range aggregations #24583)
- significant terms (Add parsing to Significant Terms aggregations #24682)
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - geo centroid
- geo bounds
- scripted metric (Add parsing for InternalScriptedMetric aggregation #24738)
- matrix stats (Add parsing method for Matrix Stats #24746)
- numeric metrics
- stats
- extended stats
- stats bucket
- extended stats
- min
- max
- avg
- sum
- value count
- simple value
- derivative
- bucket metric value
- cardinality
- tdigest percentiles
- hdr percentiles
- tdigest percentile_ranks
- hdr percentile_ranks
- percentiles bucket
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.search scroll apiclear scroll apiTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
francescou, jettro, fmyblack, clintongormley, moodysalem and 8 more
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
falsyvalues commentedon Feb 28, 2017
I'm not sure if its correct place for that... Does HTTP Client will have native client features like custer sniffing and other cluster related features?
dadoonet commentedon Feb 28, 2017
@falsyvalues ideally ask on discuss.elastic.co.
HTTP Client already has sniffing with https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/sniffer.html
Not related to the high level client.
moodysalem commentedon Mar 6, 2017
Could you make it a short term goal to pull out the model objects (e.g. SearchSourceBuilder, QueryBuilders) into their own maven module?
Right now the existing REST client, Jest, suggests adding the transport module as a dependency to use these request objects/builders, which in my case adds 20mb to my otherwise <10mb bundle-which is especially important because I'm using AWS lambda and a bigger bundle takes longer to get started.
Also, separating out these objects makes it easier to use your own HTTP client if you'd like to-IMO the request and response POJOs are much more useful than the client that abstracts making HTTP requests with those objects and deserialization/serialization, since there are already plenty of java HTTP clients and JSON serialization/deserialization libraries. Also in my case I need to configure the HTTP client to sign requests
EDIT: I am playing with separating out the model classes and it does seem like the model classes have a lot of dependencies on lucene and elasticsearch common classes which could make that a lot more difficult than I expected
2nd EDIT: I was able to get around bringing in the elasticsearch dependency building my query using JsonObjects and JsonArrays with a helper class
3rd EDIT: for anyone who runs into the same scenario as me.. here is the helper class that I used to build the query object https://gist.github.com/moodysalem/585033149bb85f1e6079f1d507f8c72d
javanna commentedon Mar 14, 2017
hi @moodysalem I agree that ideally the Java client should not depend on Elasticsearch. We would love not to have that but we gave high priority to have the high level REST client out there sooner rather than later, although it will still depend on Elasticsearch initially. Once it's out, we may decide to work on taking those requests and response classes out to a common library, but as you found out that will require quite some work, which is why we decided not to do it straight-away but rather go step by step.
s1monw commentedon Mar 15, 2017
one thing that I can see being a low hanging fruit is that we can move out our core analyzers into a module. This would allow us to move out the
analyzers-common
JAR that is ~ 11MB which would help a lot with this issue already. I don't think breaking outSearchSourceBuilder
is a low hanging fruit at all it has lots of dependencies, I also would rather want to make core smaller and keep on depending on it than doing it the other way round. There is alsohighlighters
that can be moved in to a module or maybe even into the same module for simplicity.Suggesters
is a similar thing.. I think we should look into this! @rjernst WDYTnik9000 commentedon Mar 15, 2017
I'd be happy to move the analyzers, suggesters, and highlighters into their own modules. I think it'd be faster to exclude their dependencies from the high level client, though a bit less clean.
s1monw commentedon Mar 15, 2017
++ @nik9000
37 remaining items
yingqiaomxi commentedon Jul 24, 2017
Many thank!
dadoonet commentedon Jul 28, 2017
Adding to the latest comments in case anyone is looking for the high level rest client that names changed and are now:
Change elasticsearch artifact ids and fix classes
Update to elasticsearch 5.6.0
Update to elasticsearch 5.6.0
jagginarendra commentedon Sep 15, 2017
@dadoonet when I am using the below dependency, I am getting error in pom.xml
org.elasticsearch.client elasticsearch-rest-client 5.6.0-SNAPSHOT org.elasticsearch.client elasticsearch-rest-high-level-client 5.6.0-SNAPSHOTerror - Missing artifact org.elasticsearch.client:elasticsearch-rest-client:jar:5.6.0-SNAPSHOT
dadoonet commentedon Sep 15, 2017
5.6.0 has been released. Remove the SNAPSHOT part
malhotras commentedon Jan 4, 2018
@dadoonet
Below is my pom.xml file..it is not working.
Error: Original error: Could not transfer artifact org.elasticsearch:elasticsearch:jar:5.6.0 from/to nexus (http://vm-maslxjavadev01.tools.org:8083/repository/maven-public/): unexpected end of stream
Can you please suggest the solution?
dadoonet commentedon Jan 5, 2018
@malhotras Please ask your questions on discuss.elastic.co (with a good formatting please) where we can give a better support.
Thanks!
Update to Elasticsearch 5.6.0 (#27)
mrkk commentedon May 10, 2019
can you give an example of what is needed at bare minimum and what to exclude in a maven pom file for the REST client to work?
At the very least you guys can document this properly in examples.