[ANN] Jest - ElasticSearch Java Rest Client

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access
ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application
https://github.com/searchbox-io/java-jest-sample with basic search feature
of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmezhttps://twitter.com/dogukansonmezfor his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service, build
by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--

Excellent !
Thanks for sharing.

Don't Forget to add a pull request on Client and integration pages on elasticsearch.github.com repo. :wink:

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 sept. 2012 à 14:56, ferhatsb ferhat.sobay@gmail.com a écrit :

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application https://github.com/searchbox-io/java-jest-sample with basic search feature of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmez for his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service, build by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--

Thanks David!

A pull request is incoming!

On Tuesday, September 25, 2012 4:00:29 PM UTC+3, David Pilato wrote:

Excellent !
Thanks for sharing.

Don't Forget to add a pull request on Client and integration pages on
elasticsearch.github.com repo. :wink:

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 sept. 2012 à 14:56, ferhatsb <ferhat...@gmail.com <javascript:>> a
écrit :

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access
ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application
https://github.com/searchbox-io/java-jest-sample with basic search
feature of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmezhttps://twitter.com/dogukansonmezfor his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service,
build by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--

--

Ha!

And I was about to ask how come there is no Java client that uses HTTP and
whether it would make sense to create one.

Can Jest detect other nodes in the cluster (I see you can specify a list
already, but...) a la TransportClient? Would be nice...

Otis

Search Analytics - http://sematext.com/search-analytics/index.html
Performance Monitoring - http://sematext.com/spm/index.html

On Tuesday, September 25, 2012 8:56:36 AM UTC-4, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access
ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application
https://github.com/searchbox-io/java-jest-sample with basic search
feature of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmezhttps://twitter.com/dogukansonmezfor his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service,
build by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--

Finally ... And I this said beforehttps://groups.google.com/forum/#!msg/elasticsearch/xp3gLrkHReE/OS7wwRT2TgMJ.

On Wednesday, September 26, 2012 6:54:24 AM UTC+3, Otis Gospodnetic wrote:

Ha!

And I was about to ask how come there is no Java client that uses HTTP and
whether it would make sense to create one.

Can Jest detect other nodes in the cluster (I see you can specify a list
already, but...) a la TransportClient? Would be nice...

Otis

Search Analytics - http://sematext.com/search-analytics/index.html
Performance Monitoring - http://sematext.com/spm/index.html

On Tuesday, September 25, 2012 8:56:36 AM UTC-4, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access
ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application
https://github.com/searchbox-io/java-jest-sample with basic search
feature of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmezhttps://twitter.com/dogukansonmezfor his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service,
build by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--

Hi,
have you considered the contribution that JEST may make to a GWT interface
for ElasticSearch?

GWT compiles Java to client-side Javascript. On the presumption that JEST
is collating JSON payloads that represent ElasticSearch queries, then I
believe the JSON collation part of the library could be written in a GWT
compliant subset of Java. This subset could then be used by GWT client
applications as an easier way of collating ElasticSearch queries.

Just a thought,
Ian

On Tuesday, 25 September 2012 13:56:36 UTC+1, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

[...]

All comments, feedbacks are welcomed.

Regards,
Ferhat.
www.searchbox.io

--

Hi,

FYI, I am working in my spare time on a modularization of the ES codebase
into client and server code. The client side will have a small footprint
and will offer several protocol implementations, WebSocket, later also
SPDY, and of course REST via HTTP. Also, this Java client will be layered
into ingest, search, and admin client tasks.

Unfortunately it is too early to announce a release with all features
ready, since much of the ES actions have to be implemented yet. A
pre-release for the impatient is available
at https://github.com/jprante/elasticsearch-client

My main motivation was creating a minimal ingest client which is able to
push data into ES while staying compatible to the XContentBuilder API but
without being dependent on the Lucene jars. Using the QueryBuilder API
requires Lucene.

Because of the smaller footprint, an Android ES client might also be easier
to evolve, continuing the effort of

But also, this client code can be integrated into such environments you
mention. Personally I think that an integration into Vaadin which uses GWT
would be a good thing, for building pure Java solutions where the ES
cluster is encapsulated in a backend.

Of course, for Javascript ES clients, the more straightforward method is to
set up a proxy to control the access to port 9200 and let jQuery and the
like do their Ajax requests to the ES REST API.

Best regards,

Jörg

On Wednesday, September 26, 2012 4:34:55 PM UTC+2, ian mayo wrote:

Hi,
have you considered the contribution that JEST may make to a GWT interface
for ElasticSearch?

GWT compiles Java to client-side Javascript. On the presumption that JEST
is collating JSON payloads that represent ElasticSearch queries, then I
believe the JSON collation part of the library could be written in a GWT
compliant subset of Java. This subset could then be used by GWT client
applications as an easier way of collating ElasticSearch queries.

Just a thought,
Ian

On Tuesday, 25 September 2012 13:56:36 UTC+1, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

[...]

All comments, feedbacks are welcomed.

Regards,
Ferhat.
www.searchbox.io

--

Hi,

A nice discussion goes here noticed lately :slight_smile:

@otis Discovering nodes automatically seems nice,currently it is just a
round robin, I invite you to open an issue :slight_smile:

@Ian We did not consider to create another layer on top of Jest, we are now
focused on to complete, clear and maintain it. Also I aggree with Jörg's.

@Jörg You have a point, Jest is a little fat with ES and all Lucene, gonna
check your code base.

Now we are creating a roadmap for Jest, first priority is to complete the
API and remove unnecessary dependencies and code pieces. Then we want to
implement async features.

We want to hear from you guys.

KR,
Ferhat.

On Wednesday, September 26, 2012 6:28:18 PM UTC+3, Jörg Prante wrote:

Hi,

FYI, I am working in my spare time on a modularization of the ES codebase
into client and server code. The client side will have a small footprint
and will offer several protocol implementations, WebSocket, later also
SPDY, and of course REST via HTTP. Also, this Java client will be layered
into ingest, search, and admin client tasks.

Unfortunately it is too early to announce a release with all features
ready, since much of the ES actions have to be implemented yet. A
pre-release for the impatient is available at
https://github.com/jprante/elasticsearch-client

My main motivation was creating a minimal ingest client which is able to
push data into ES while staying compatible to the XContentBuilder API but
without being dependent on the Lucene jars. Using the QueryBuilder API
requires Lucene.

Because of the smaller footprint, an Android ES client might also be
easier to evolve, continuing the effort of
https://github.com/karussell/ElasticSearch4Android

But also, this client code can be integrated into such environments you
mention. Personally I think that an integration into Vaadin which uses GWT
would be a good thing, for building pure Java solutions where the ES
cluster is encapsulated in a backend.

Of course, for Javascript ES clients, the more straightforward method is
to set up a proxy to control the access to port 9200 and let jQuery and the
like do their Ajax requests to the ES REST API.

Best regards,

Jörg

On Wednesday, September 26, 2012 4:34:55 PM UTC+2, ian mayo wrote:

Hi,
have you considered the contribution that JEST may make to a GWT
interface for ElasticSearch?

GWT compiles Java to client-side Javascript. On the presumption that
JEST is collating JSON payloads that represent ElasticSearch queries, then
I believe the JSON collation part of the library could be written in a GWT
compliant subset of Java. This subset could then be used by GWT client
applications as an easier way of collating ElasticSearch queries.

Just a thought,
Ian

On Tuesday, 25 September 2012 13:56:36 UTC+1, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

[...]

All comments, feedbacks are welcomed.

Regards,
Ferhat.
www.searchbox.io

--

Hello there,

I have created ES thin client based on Jackson + HttpClient for our
company. I don't think, that it's good to work with a lot of strings in
client. I have based my structure on real ES client.
The only reason we have done this was the missing ES Java client. We
don't want to have all the lucene, cluster, joda, netty ... classes in
each our application (war/ear).

Example:
new ESSearchRequestBuilder(
httpClient,
pretty)
.setIndices("index_name")
.setTypes("index type")
.sourceBuilder(
new ESSearchSourceBuilder()
.page(1, 10)
.query(ESQueryBuilders.boolQuery()
.must(ESQueryBuilders.nestedQuery("path",
ESQueryBuilders.queryString("query")))
.must(ESQueryBuilders.termQuery("field", "value"))

.must(ESQueryBuilders.queryString(prepareWildcardQuery("query")).field("field"))
)
.sort("field", ESSortOrder.ASC)
)
.request()
.getResponse();

As Response comes ESSearchResponse Java Object where T ist the source
object. Means we are working just with java objects and with help of
Jackson is all transformed to JSON/parsed from JSON.

On Tuesday, September 25, 2012 2:56:36 PM UTC+2, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access
ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application
https://github.com/searchbox-io/java-jest-sample with basic search
feature of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmezhttps://twitter.com/dogukansonmezfor his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service,
build by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--

Ferhat et al,
First of Ferhat thanks for this client, it is really handy. On another
note I am using version 0.0.3 and am running into some issues, we have a
tomcat rest service that abstracts away our elasticsearch infrastructure,
we are using spring and autowiring in the JestClientFactory, when we go to
perform a search or an insert we basically call getObject to get a
JestClient object. The code works fine under normal circumstances,
however under a perf test it falls over with the following tomcat error:

org.apache.tomcat.util.net.JloEndpoint - Socket accept failed
java.net.SocketException: Too many open files

Code for insert:

if(isEmpty(documents))
{
return null;
}
Bulk bulk = new Bulk();
for(Document document : documents)
{
bulk.addIndex(new
Index.Builder(document).index(getIndex().toLowerCase()).type(getType()).id((String)document.get("id")).build());
}
JestClient
jestClient=(JestClient)getJestClientFactory().getObject();
JestResult result=jestClient.execute(bulk);
if (!result.isSucceeded()) {
logger.error("IndexDocumentCommand::the bulk operation to index
documents failed with message"+result.getErrorMessage());
} else {
logger.error("IndexDocumentCommand::the bulk operation to index
documents succeeded with message"+result.getJsonString());
}

I dont believe I am doing anything out of the ordinary here, any thoughts
on this? Also I have checked the ulimit on the vm's in our dev
environment and increased that to a large number. Also please let me know
if I should use another forum to talk to the Jest folks, my apologies if
this is not the right place.

Thanks for your help on this.
Regards

On Tuesday, September 25, 2012 5:56:36 AM UTC-7, ferhatsb wrote:

Hi All!

We are proud to announce Jest, a Java client for ElasticSearch rest
interface. https://github.com/searchbox-io/Jest

It is useful when you need to work with Java/JVM and do not have access
ElasticSearch via native Java API.
For now it covers core API but rest of the API also in development.

Check out sample Java application
https://github.com/searchbox-io/java-jest-sample with basic search
feature of ElasticSearch.

All comments, feedbacks are welcomed.

I want give a special thanks to @dogukansonmezhttps://twitter.com/dogukansonmezfor his hard work to make this real.

We also invite you to use www.searchbox.io. ElasticSearch as service,
build by nerds for nerds!

Regards,
Ferhat.
www.searchbox.io

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

hello @ferhatsb
the link https://github.com/searchbox-io/java-jest-sample does not work anymore and it would help me a lot if i took a look on it thanks