2013-08-28 19:24:34 -04:00
|
|
|
= Groovy API
|
2015-05-01 14:37:26 -04:00
|
|
|
:ref: http://www.elastic.co/guide/en/elasticsearch/reference/current
|
|
|
|
:java: http://www.elastic.co/guide/en/elasticsearch/client/java-api/current
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[preface]
|
|
|
|
== Preface
|
|
|
|
|
2015-06-14 23:55:01 -04:00
|
|
|
This section describes the http://groovy-lang.org/[Groovy] API
|
2013-08-28 19:24:34 -04:00
|
|
|
elasticsearch provides. All elasticsearch APIs are executed using a
|
|
|
|
<<client,GClient>>, and are completely
|
|
|
|
asynchronous in nature (they either accept a listener, or return a
|
|
|
|
future).
|
|
|
|
|
|
|
|
The Groovy API is a wrapper on top of the
|
2013-09-03 10:15:28 -04:00
|
|
|
{java}[Java API] exposing it in a groovier
|
2013-08-28 19:24:34 -04:00
|
|
|
manner. The execution options for each API follow a similar manner and
|
|
|
|
covered in <<anatomy>>.
|
|
|
|
|
2013-09-03 10:15:07 -04:00
|
|
|
|
2013-09-25 12:17:40 -04:00
|
|
|
[[maven]]
|
2013-09-03 10:28:44 -04:00
|
|
|
=== Maven Repository
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
The Groovy API is hosted on
|
2015-06-19 11:54:57 -04:00
|
|
|
http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22elasticsearch-groovy%22[Maven
|
2013-08-28 19:24:34 -04:00
|
|
|
Central].
|
|
|
|
|
|
|
|
For example, you can define the latest version in your `pom.xml` file:
|
|
|
|
|
|
|
|
[source,xml]
|
|
|
|
--------------------------------------------------
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.elasticsearch</groupId>
|
2015-06-19 11:54:57 -04:00
|
|
|
<artifactId>elasticsearch-groovy</artifactId>
|
2013-08-28 19:24:34 -04:00
|
|
|
<version>${es.version}</version>
|
|
|
|
</dependency>
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
include::anatomy.asciidoc[]
|
|
|
|
|
|
|
|
include::client.asciidoc[]
|
|
|
|
|
|
|
|
include::index_.asciidoc[]
|
|
|
|
|
|
|
|
include::get.asciidoc[]
|
|
|
|
|
|
|
|
include::delete.asciidoc[]
|
|
|
|
|
|
|
|
include::search.asciidoc[]
|
|
|
|
|
|
|
|
include::count.asciidoc[]
|