public final class ElasticsearchEnvironment extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ElasticsearchEnvironment.Defaults
Default values for the different settings if no values are given.
|
Modifier and Type | Field and Description |
---|---|
static String |
ANALYSIS_DEFINITION_PROVIDER
Provider of default analysis-related definitions for Elasticsearch.
|
static String |
DISCOVERY_ENABLED
Property for specifying whether automatic discovery of nodes in the Elasticsearch cluster is enabled.
|
static String |
DISCOVERY_REFRESH_INTERVAL
Property for specifying the time interval between two executions of the automatic discovery, if enabled.
|
static String |
DISCOVERY_SCHEME
Property for specifying the default scheme to use when connecting to automatically discovered nodes.
|
static String |
DYNAMIC_MAPPING
Equivalent to elasticsearch "dynamic" mapping attribute, define what to do when an indexed document
contains a field which was not declared in the index schema.
|
static String |
INDEX_MANAGEMENT_WAIT_TIMEOUT
Property for specifying the timeout for index management operations (index creation etc.) in milli-seconds.
|
static String |
INDEX_SCHEMA_MANAGEMENT_STRATEGY
Property for specifying the strategy for maintaining the Elasticsearch index.
|
static String |
LOG_JSON_PRETTY_PRINTING
Whether JSON included in logs should be pretty-printed (indented, with line breaks).
|
static String |
MAX_TOTAL_CONNECTION
Property for specifying the maximum number of simultaneous connections to the Elasticsearch cluster.
|
static String |
MAX_TOTAL_CONNECTION_PER_ROUTE
Property for specifying the maximum number of simultaneous connections to a single Elasticsearch server.
|
static String |
REFRESH_AFTER_WRITE
Property for specifying whether an explicit index refresh should be issued after a set of operations targeting a
given index has been executed or not.
|
static String |
REQUIRED_INDEX_STATUS
Property for specifying the status an index must at least have in order for Hibernate Search to work with it.
|
static String |
SCROLL_BACKTRACKING_WINDOW_SIZE
Property for specifying the the minimum number of previous results kept in memory at any time when scrolling.
|
static String |
SCROLL_FETCH_SIZE
Property for specifying the the number of results fetched by each Elasticsearch call when scrolling.
|
static String |
SCROLL_TIMEOUT
Property for specifying the maximum duration
ScrollableResults will be usable if no
other results are fetched from Elasticsearch, in seconds. |
static String |
SERVER_CONNECTION_TIMEOUT
Property for specifying the timeout when connecting to an Elasticsearch server.
|
static String |
SERVER_PASSWORD
Property for specifying the password to send when connecting to the Elasticsearch servers.
|
static String |
SERVER_READ_TIMEOUT
Property for specifying the timeout when reading responses from an Elasticsearch server.
|
static String |
SERVER_REQUEST_TIMEOUT
Property for specifying the timeout when executing a request to an Elasticsearch server.
|
static String |
SERVER_URI
Property for specifying the host names and HTTP ports of the Elasticsearch servers to connect to.
|
static String |
SERVER_USERNAME
Property for specifying the username to send when connecting to the Elasticsearch servers.
|
public static final String SERVER_URI
URIs such as http://myeshost.com:9200 are expected, separated by whitespace characters.
Defaults to ElasticsearchEnvironment.Defaults.SERVER_URI
.
Multiple servers may be specified for load-balancing: requests will be assigned to each host in turns. Failover is not supported yet.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.host
).
This limitation will be removed in a future version of Hibernate Search.
public static final String SERVER_USERNAME
A string is expected.
Defaults to no username (anonymous access).
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.username
).
This limitation will be removed in a future version of Hibernate Search.
public static final String SERVER_PASSWORD
A string is expected.
Defaults to no password at all.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.password
).
This limitation will be removed in a future version of Hibernate Search.
public static final String SERVER_REQUEST_TIMEOUT
This includes the time needed to establish a connection, send the request and receive the whole response, optionally re-trying multiple times in case of node failure.
A numeric value in milliseconds, such as 60000 is expected.
Defaults to ElasticsearchEnvironment.Defaults.SERVER_REQUEST_TIMEOUT
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.request_timeout
).
This limitation will be removed in a future version of Hibernate Search.
public static final String SERVER_READ_TIMEOUT
A numeric value in milliseconds, such as 60000 is expected.
Defaults to ElasticsearchEnvironment.Defaults.SERVER_READ_TIMEOUT
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.read_timeout
).
This limitation will be removed in a future version of Hibernate Search.
public static final String SERVER_CONNECTION_TIMEOUT
A numeric value in milliseconds, such as 2000 is expected.
Defaults to ElasticsearchEnvironment.Defaults.SERVER_CONNECTION_TIMEOUT
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.connection_timeout
).
This limitation will be removed in a future version of Hibernate Search.
public static final String MAX_TOTAL_CONNECTION
A positive numeric value is expected.
Defaults to ElasticsearchEnvironment.Defaults.MAX_TOTAL_CONNECTION
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.max_total_connection
).
This limitation will be removed in a future version of Hibernate Search.
public static final String MAX_TOTAL_CONNECTION_PER_ROUTE
A positive numeric value is expected.
Defaults to ElasticsearchEnvironment.Defaults.MAX_TOTAL_CONNECTION_PER_ROUTE
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.max_total_connection_per_route
).
This limitation will be removed in a future version of Hibernate Search.
public static final String DISCOVERY_ENABLED
Either true
or false
is expected.
Defaults to ElasticsearchEnvironment.Defaults.DISCOVERY_ENABLED
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.discovery.enabled
).
This limitation will be removed in a future version of Hibernate Search.
public static final String DISCOVERY_REFRESH_INTERVAL
A positive numeric value in seconds is expected.
Defaults to ElasticsearchEnvironment.Defaults.DISCOVERY_REFRESH_INTERVAL
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.discovery.refresh_interval
).
This limitation will be removed in a future version of Hibernate Search.
public static final String DISCOVERY_SCHEME
Either "http" or "https" is expected.
Defaults to ElasticsearchEnvironment.Defaults.DISCOVERY_SCHEME
.
To be given globally only (i.e. prefixed with hibernate.search.default.
).
Cannot be specified per index (e.g. hibernate.search.myIndex.elasticsearch.discovery.default_scheme
).
This limitation will be removed in a future version of Hibernate Search.
public static final String INDEX_SCHEMA_MANAGEMENT_STRATEGY
The external name of one of the IndexSchemaManagementStrategy
constants is expected, e.g. 'update'
(the external names can be retrieved programmatically using IndexSchemaManagementStrategy.getExternalName()
).
Can be given globally (e.g. hibernate.search.default.elasticsearch.index_schema_management_strategy=update
) or
for specific indexes (e.g. hibernate.search.someindex.elasticsearch.index_schema_management_strategy=drop-and-create
).
public static final String INDEX_MANAGEMENT_WAIT_TIMEOUT
A numeric value such as 1000 is expected.
Defaults to ElasticsearchEnvironment.Defaults.INDEX_MANAGEMENT_WAIT_TIMEOUT
ms.
Can be given globally (e.g. hibernate.search.default.elasticsearch.index_management_wait_timeout=5000
) or
for specific indexes (e.g. hibernate.search.someindex.elasticsearch.index_management_wait_timeout=2000
).
public static final String REQUIRED_INDEX_STATUS
One of 'green', 'yellow' or 'red' is expected.
Defaults to ElasticsearchEnvironment.Defaults.REQUIRED_INDEX_STATUS
.
Can be given globally (e.g. hibernate.search.default.elasticsearch.required_index_status=green
) or for
specific indexes (e.g. hibernate.search.someindex.elasticsearch.required_index_status=yellow
).
public static final String REFRESH_AFTER_WRITE
A boolean value (true, false) is expected.
Defaults to ElasticsearchEnvironment.Defaults.REFRESH_AFTER_WRITE
.
Can be given globally (e.g. hibernate.search.default.elasticsearch.refresh_after_write=false
) or for
specific indexes (e.g. hibernate.search.someindex.elasticsearch.refresh_after_write=true
).
public static final String SCROLL_BACKTRACKING_WINDOW_SIZE
This determines the number of positions one will be able to scroll backward (backtracking) without starting over the scrolling.
A strictly positive value is expected.
Defaults to ElasticsearchEnvironment.Defaults.SCROLL_BACKTRACKING_WINDOW_SIZE
.
Can only be given globally (e.g.
hibernate.search.elasticsearch.scroll_backtracking_window_size=10000
).
public static final String SCROLL_FETCH_SIZE
A strictly positive value is expected.
Defaults to ElasticsearchEnvironment.Defaults.SCROLL_FETCH_SIZE
.
Can only be given globally (e.g.
hibernate.search.elasticsearch.scroll_fetch_size=1000
).
public static final String SCROLL_TIMEOUT
ScrollableResults
will be usable if no
other results are fetched from Elasticsearch, in seconds.
A strictly positive value is expected.
Defaults to ElasticsearchEnvironment.Defaults.SCROLL_TIMEOUT
.
Can only be given globally (e.g.
hibernate.search.elasticsearch.scroll_timeout=60
).
public static final String DYNAMIC_MAPPING
Possible values are:
true
: Add unknown fields to the schema dynamicallyfalse
: Ignore unknown fieldsstrict
: Throw an exception on unknown fields
Defaults to strict
.
Can be given globally (e.g. hibernate.search.default.elasticsearch.dynamic_mapping=false
) or for
specific indexes (e.g. hibernate.search.someindex.elasticsearch.dynamic_mapping=true
).
public static final String ANALYSIS_DEFINITION_PROVIDER
The value must be the fully-qualified name of a class implementing ElasticsearchAnalysisDefinitionProvider
.
public static final String LOG_JSON_PRETTY_PRINTING
A boolean value (true, false) is expected.
Defaults to ElasticsearchEnvironment.Defaults.LOG_JSON_PRETTY_PRINTING
.
Can only be given globally (e.g.
hibernate.search.elasticsearch.log.json_pretty_printing=true
).
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved