index.asciidoc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. [[java-api]]
  2. = Java API
  3. :ref: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current
  4. [preface]
  5. == Preface
  6. This section describes the Java API that elasticsearch provides. All
  7. elasticsearch operations are executed using a
  8. <<client,Client>> object. All
  9. operations are completely asynchronous in nature (either accepts a
  10. listener, or returns a future).
  11. Additionally, operations on a client may be accumulated and executed in
  12. <<bulk,Bulk>>.
  13. Note, all the APIs are exposed through the
  14. Java API (actually, the Java API is used internally to execute them).
  15. == Maven Repository
  16. Elasticsearch is hosted on
  17. http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22elasticsearch%22[Maven
  18. Central].
  19. For example, you can define the latest version in your `pom.xml` file:
  20. [source,xml]
  21. --------------------------------------------------
  22. <dependency>
  23. <groupId>org.elasticsearch</groupId>
  24. <artifactId>elasticsearch</artifactId>
  25. <version>${es.version}</version>
  26. </dependency>
  27. --------------------------------------------------
  28. == Deploying in JBoss EAP6 module
  29. Elasticsearch and Lucene classes need to be in the same JBoss module.
  30. You should define a `module.xml` file like this:
  31. [source,xml]
  32. --------------------------------------------------
  33. <?xml version="1.0" encoding="UTF-8"?>
  34. <module xmlns="urn:jboss:module:1.1" name="org.elasticsearch">
  35. <resources>
  36. <!-- Elasticsearch -->
  37. <resource-root path="elasticsearch-1.4.1.jar"/>
  38. <!-- Lucene -->
  39. <resource-root path="lucene-core-4.10.2.jar"/>
  40. <resource-root path="lucene-analyzers-common-4.10.2.jar"/>
  41. <resource-root path="lucene-queries-4.10.2.jar"/>
  42. <resource-root path="lucene-memory-4.10.2.jar"/>
  43. <resource-root path="lucene-highlighter-4.10.2.jar"/>
  44. <resource-root path="lucene-queryparser-4.10.2.jar"/>
  45. <resource-root path="lucene-sandbox-4.10.2.jar"/>
  46. <resource-root path="lucene-suggest-4.10.2.jar"/>
  47. <resource-root path="lucene-misc-4.10.2.jar"/>
  48. <resource-root path="lucene-join-4.10.2.jar"/>
  49. <resource-root path="lucene-grouping-4.10.2.jar"/>
  50. <resource-root path="lucene-spatial-4.10.2.jar"/>
  51. <resource-root path="lucene-expressions-4.10.2.jar"/>
  52. <!-- Insert other resources here -->
  53. </resources>
  54. <dependencies>
  55. <module name="sun.jdk" export="true" >
  56. <imports>
  57. <include path="sun/misc/Unsafe" />
  58. </imports>
  59. </module>
  60. <module name="org.apache.log4j"/>
  61. <module name="org.apache.commons.logging"/>
  62. <module name="javax.api"/>
  63. </dependencies>
  64. </module>
  65. --------------------------------------------------
  66. include::client.asciidoc[]
  67. include::index_.asciidoc[]
  68. include::get.asciidoc[]
  69. include::delete.asciidoc[]
  70. include::update.asciidoc[]
  71. include::bulk.asciidoc[]
  72. include::search.asciidoc[]
  73. include::count.asciidoc[]
  74. include::delete-by-query.asciidoc[]
  75. include::facets.asciidoc[]
  76. include::aggs.asciidoc[]
  77. include::percolate.asciidoc[]
  78. include::query-dsl-queries.asciidoc[]
  79. include::query-dsl-filters.asciidoc[]