== ElasticSearch Search Source Kamelet Description

This Kamelet performs periodic searches on an ElasticSearch cluster using a specified query and returns the search results as JSON messages.

=== Authentication methods

The Kamelet supports multiple authentication options:

- **Basic Authentication**: Use `user` and `password` parameters
- **SSL/TLS**: Enable secure connections with `enableSSL` (default: true)
- **Certificate Authentication**: Provide a base64-encoded certificate via the `certificate` parameter

=== Output format

The Kamelet outputs search results in JSON format using the Gson library. Each search operation returns the complete ElasticSearch response including hits, metadata, and aggregations.

=== Configuration requirements

The Kamelet requires the following mandatory properties:

- **query**: ElasticSearch query to execute
- **clusterName**: Name of the ElasticSearch cluster
- **indexName**: Index to search against
- **hostAddresses**: Comma-separated list of host:port addresses

=== Connection security

For production environments, consider:

- Using SSL connections (`enableSSL: true`)
- Providing proper authentication credentials
- Using certificate-based authentication for enhanced security

=== Usage examples

Basic ElasticSearch search with authentication:

[source,yaml,subs='+attributes,macros']
----
- route:
    from:
      uri: "kamelet:elasticsearch-search-source"
      parameters:
        query: '{"query": {"match_all": {}}}'
        clusterName: "my-cluster"
        indexName: "my-index"
        hostAddresses: "localhost:9200"
        user: "elastic"
        password: "changeme"
        period: 30000
      steps:
        - to:
            uri: "kamelet:log-sink"
----

Search with specific query and SSL:

[source,yaml,subs='+attributes,macros']
----
- route:
    from:
      uri: "kamelet:elasticsearch-search-source"
      parameters:
        query: '{"query": {"term": {"status": "active"}}, "size": 100}'
        clusterName: "production-cluster"
        indexName: "users"
        hostAddresses: "es-node1:9200,es-node2:9200"
        enableSSL: true
        user: "search-user"
        password: "secure-password"
        period: 60000
      steps:
        - to:
            uri: "kamelet:log-sink"
----

Search with certificate authentication:

[source,yaml,subs='+attributes,macros']
----
- route:
    from:
      uri: "kamelet:elasticsearch-search-source"
      parameters:
        query: '{"query": {"range": {"timestamp": {"gte": "now-1h"}}}}'
        clusterName: "secure-cluster"
        indexName: "logs"
        hostAddresses: "es.example.com:9200"
        enableSSL: true
        certificate: "LS0tLS1CRUdJTi... (base64 encoded certificate)"
        period: 10000
      steps:
        - to:
            uri: "kamelet:log-sink"
----