Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the options for configuring the ElasticSearch REST client #2923

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,31 @@ Or add the coordinates to your existing project:
----

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
----

24 changes: 24 additions & 0 deletions extensions/elasticsearch-rest/runtime/src/main/doc/usage.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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
----