password;
/**
- * The connection timeout.
+ * The timeout when establishing a connection to an Elasticsearch server.
*/
- @ConfigItem(defaultValue = "3S")
+ @ConfigItem(defaultValue = "1S")
Duration connectionTimeout;
+ /**
+ * The timeout when reading responses from an Elasticsearch server.
+ */
+ @ConfigItem(defaultValue = "30S")
+ Duration readTimeout;
+
+ /**
+ * The timeout when executing a request to an Elasticsearch server.
+ *
+ * This includes the time needed to wait for a connection to be available,
+ * send the request and read the response.
+ */
+ @ConfigItem
+ Optional requestTimeout;
+
/**
* The maximum number of connections to all the Elasticsearch servers.
*/
@@ -129,14 +144,14 @@ public static class ElasticsearchBackendRuntimeConfig {
* The default configuration for the Elasticsearch indexes.
*/
@ConfigItem(name = ConfigItem.PARENT)
- ElasticsearchIndexConfig indexDefaults;
+ ElasticsearchIndexRuntimeConfig indexDefaults;
/**
* Per-index specific configuration.
*/
@ConfigItem
@ConfigDocMapKey("index-name")
- Map indexes;
+ Map indexes;
}
public enum ElasticsearchClientProtocol {
@@ -174,7 +189,7 @@ public String getHibernateSearchString() {
}
@ConfigGroup
- public static class ElasticsearchIndexConfig {
+ public static class ElasticsearchIndexRuntimeConfig {
/**
* Configuration for the schema management of the indexes.
*/
@@ -374,7 +389,7 @@ public static class ElasticsearchIndexIndexingConfig {
* which may lead to higher indexing throughput,
* but incurs a risk of overloading Elasticsearch,
* i.e. of overflowing its HTTP request buffers and tripping
- * circuit breakers,
+ * circuit breakers,
* leading to Elasticsearch giving up on some request and resulting in indexing failures.
*/
// We can't set an actual default value here: see comment on this class.
@@ -400,7 +415,7 @@ public static class ElasticsearchIndexIndexingConfig {
* which may lead to higher indexing throughput,
* but incurs a risk of overloading Elasticsearch,
* i.e. of overflowing its HTTP request buffers and tripping
- * circuit breakers,
+ * circuit breakers,
* leading to Elasticsearch giving up on some request and resulting in indexing failures.
*
* Note that raising this number above the queue size has no effect,
diff --git a/integration-tests/hibernate-search-elasticsearch/src/main/java/io/quarkus/it/hibernate/search/elasticsearch/search/Person.java b/integration-tests/hibernate-search-elasticsearch/src/main/java/io/quarkus/it/hibernate/search/elasticsearch/search/Person.java
index ab66e88134ed9..96535302012e5 100644
--- a/integration-tests/hibernate-search-elasticsearch/src/main/java/io/quarkus/it/hibernate/search/elasticsearch/search/Person.java
+++ b/integration-tests/hibernate-search-elasticsearch/src/main/java/io/quarkus/it/hibernate/search/elasticsearch/search/Person.java
@@ -8,7 +8,7 @@
import javax.persistence.Id;
import javax.persistence.ManyToOne;
-import org.hibernate.search.engine.backend.document.model.dsl.ObjectFieldStorage;
+import org.hibernate.search.engine.backend.types.ObjectStructure;
import org.hibernate.search.engine.backend.types.Sortable;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
@@ -28,7 +28,7 @@ public class Person {
private String name;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @IndexedEmbedded(storage = ObjectFieldStorage.NESTED)
+ @IndexedEmbedded(structure = ObjectStructure.NESTED)
private Address address;
public Person() {