| // Do not edit directly! |
| // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page |
| = Elasticsearch Rest |
| :page-aliases: extensions/elasticsearch-rest.adoc |
| :linkattrs: |
| :cq-artifact-id: camel-quarkus-elasticsearch-rest |
| :cq-native-supported: true |
| :cq-status: Stable |
| :cq-status-deprecation: Stable Deprecated |
| :cq-description: Send requests to ElasticSearch via REST API |
| :cq-deprecated: true |
| :cq-jvm-since: 1.0.0 |
| :cq-native-since: 1.0.0 |
| |
| [.badges] |
| [.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native since##[.badge-supported]##1.0.0## [.badge-key]##⚠️##[.badge-unsupported]##Deprecated## |
| |
| Send requests to ElasticSearch via REST API |
| |
| == What's inside |
| |
| * xref:{cq-camel-components}::elasticsearch-rest-component.adoc[Elasticsearch Rest component], URI syntax: `elasticsearch-rest:clusterName` |
| |
| Please refer to the above link for usage and configuration details. |
| |
| == Maven coordinates |
| |
| https://code.quarkus.io/?extension-search=camel-quarkus-elasticsearch-rest[Create a new project with this extension on code.quarkus.io, window="_blank"] |
| |
| Or add the coordinates to your existing project: |
| |
| [source,xml] |
| ---- |
| <dependency> |
| <groupId>org.apache.camel.quarkus</groupId> |
| <artifactId>camel-quarkus-elasticsearch-rest</artifactId> |
| </dependency> |
| ---- |
| |
| Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. |
| |
| == Usage |
| |
| This extension leverages the https://quarkus.io/guides/elasticsearch[Quarkus ElasticSearch REST Client]. |
| |
| You can choose to configure ElasticSearch via the Quarkus https://quarkus.io/guides/elasticsearch#quarkus-elasticsearch-restclient-lowlevel_configuration[configuration properties] and the `RestClient` will be autowired into the Camel ElasticSearch component. |
| |
| Or you can configure ElasticSearch via the Camel ElasticSearch component / endpoint options. When doing this, you must disable autowiring in one of the ways outlined below. |
| |
| Disabling autowiring at the component level. |
| [source,properties] |
| ---- |
| camel.component.elasticsearch-rest.autowired-enabled = false |
| ---- |
| |
| Disabling autowiring at the endpoint level. |
| [source,java] |
| ---- |
| from("direct:search") |
| .to("elasticsearch-rest://elasticsearch?hostAddresses=localhost:9200&operation=Search&indexName=index&autowiredEnabled=false") |
| ---- |
| |
| Globally disabling autowiring. Note that this disables autowiring for all components. |
| [source,properties] |
| ---- |
| camel.main.autowired-enabled = false |
| ---- |
| |