In Java, I can see there are 2 clients to work with elasticsearch: co.elastic and org.elasticsearch. I am not counting spring-data-elasticsearch
here or any other top-level abstractions.
These 2 libraries seemed to have very similar API, and even the class names are the same, but in different packages, like: SearchRequest
, SearchResponse
, ElasticsearchClient
e.t.c. It also seems that co.elastic
includes org.elasticsearch
library. So I really do not understand:
What is the purpose of one library and what is the purpose of the other?
What library we can assume to be a "native" client for elasticsearch?
Since
co.elastic
includes theorg.elasticsearch
, I assume there is a dependency between those 2 projects. It would be great if anyone will clear this dependency as well.
I did not manage to find the exact answer I am looking for, so I am posting question here.
From what I understand, while all other libraries were under the Apache 2.0 licence, the elastic HLRC (High Level Rest Client) has been under the Elastic licence until version 7.17, because the HLRC has dependencies on the core of Elasticsearch.
Then the Java HLRC has been deprecated in 7.15.0 in favor of the Java API Client. The Java API Client is licensed under Apache 2.0.
It's why it's the last version of HLRC available in this maven link.
So to me it's all a matter of licencing summarized with this picture.