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`.
  • Loading branch information
yrodiere committed Jan 29, 2024
1 parent 1ace358 commit 9a08db6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ this could cause a startup failure.
To address this, you can configure Hibernate Search to not send any request on startup:

* Disable Elasticsearch version checks on startup by setting the configuration property
<<quarkus-hibernate-search-orm-elasticsearch_quarkus-hibernate-search-orm-elasticsearch-version-check.enabled,`quarkus.hibernate-search-orm.elasticsearch.version-check.enabled`>>
<<quarkus-hibernate-search-orm-elasticsearch_quarkus-hibernate-search-orm-elasticsearch-version-check-enabled,`quarkus.hibernate-search-orm.elasticsearch.version-check.enabled`>>
to `false`.
* Disable schema management on startup by setting the configuration property
<<quarkus-hibernate-search-orm-elasticsearch_quarkus-hibernate-search-orm-schema-management-strategy,`quarkus.hibernate-search-orm.schema-management.strategy`>>
Expand Down
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 9a08db6

Please sign in to comment.