Skip to content

Commit

Permalink
Fix quarkus.hibernate-search-orm.elasticsearch.version-check.enabled …
Browse files Browse the repository at this point in the history
…not appearing in docs

Looks like Smallrye config still has trouble with passing a name
containing dots to `@WithName`.

(cherry picked from commit fe22dee)
  • Loading branch information
yrodiere authored and gsmet committed Jan 30, 2024
1 parent f5305d2 commit 3a24cbc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ private void contributeBackendRuntimeProperties(BiConsumer<String, Object> prope
addBackendConfig(propertyCollector, backendName, ElasticsearchBackendSettings.THREAD_POOL_SIZE,
elasticsearchBackendConfig.threadPool().size());
addBackendConfig(propertyCollector, backendName, ElasticsearchBackendSettings.VERSION_CHECK_ENABLED,
elasticsearchBackendConfig.versionCheck());
elasticsearchBackendConfig.versionCheck().enabled());
addBackendConfig(propertyCollector, backendName, ElasticsearchBackendSettings.QUERY_SHARD_FAILURE_IGNORE,
elasticsearchBackendConfig.query().shardFailure().ignore());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,9 @@ interface ElasticsearchBackendRuntimeConfig {
ElasticsearchQueryConfig query();

/**
* Whether Hibernate Search should check the version of the Elasticsearch cluster on startup.
*
* Set to `false` if the Elasticsearch cluster may not be available on startup.
*
* @asciidoclet
* Configuration for version checks on this backend.
*/
@WithName("version-check.enabled")
@WithDefault("true")
boolean versionCheck();
ElasticsearchVersionCheckConfig versionCheck();

/**
* The default configuration for the Elasticsearch indexes.
Expand Down Expand Up @@ -212,6 +206,19 @@ public String getHibernateSearchString() {
}
}

@ConfigGroup
interface ElasticsearchVersionCheckConfig {
/**
* Whether Hibernate Search should check the version of the Elasticsearch cluster on startup.
*
* Set to `false` if the Elasticsearch cluster may not be available on startup.
*
* @asciidoclet
*/
@WithDefault("true")
boolean enabled();
}

@ConfigGroup
interface ElasticsearchIndexRuntimeConfig {
/**
Expand Down

0 comments on commit 3a24cbc

Please sign in to comment.