- Elasticsearch Guide: other versions:
- Getting Started
- Setup
- Breaking changes
- Breaking changes in 2.0
- Removed features
- Network changes
- Multiple
path.data
striping - Mapping changes
- CRUD and routing changes
- Query DSL changes
- Search changes
- Aggregation changes
- Parent/Child changes
- Scripting changes
- Index API changes
- Snapshot and Restore changes
- Plugin and packaging changes
- Setting changes
- Stats, info, and
cat
changes - Java API changes
- Breaking changes in 2.0
- API Conventions
- Document APIs
- Search APIs
- Aggregations
- Metrics Aggregations
- Bucket Aggregations
- Children Aggregation
- Date Histogram Aggregation
- Date Range Aggregation
- Filter Aggregation
- Filters Aggregation
- Geo Distance Aggregation
- GeoHash grid Aggregation
- Global Aggregation
- Histogram Aggregation
- IPv4 Range Aggregation
- Missing Aggregation
- Nested Aggregation
- Range Aggregation
- Reverse nested Aggregation
- Sampler Aggregation
- Significant Terms Aggregation
- Terms Aggregation
- Pipeline Aggregations
- Caching heavy aggregations
- Returning only aggregation results
- Aggregation Metadata
- Indices APIs
- Create Index
- Delete Index
- Get Index
- Indices Exists
- Open / Close Index API
- Put Mapping
- Get Mapping
- Get Field Mapping
- Types Exists
- Index Aliases
- Update Indices Settings
- Get Settings
- Analyze
- Index Templates
- Warmers
- Shadow replica indices
- Indices Stats
- Indices Segments
- Indices Recovery
- Indices Shard Stores
- Clear Cache
- Flush
- Refresh
- Optimize
- Upgrade
- cat APIs
- Cluster APIs
- Query DSL
- Mapping
- Field datatypes
- Meta-Fields
- Mapping parameters
analyzer
boost
coerce
copy_to
doc_values
dynamic
enabled
fielddata
format
geohash
geohash_precision
geohash_prefix
ignore_above
ignore_malformed
include_in_all
index
index_options
lat_lon
fields
norms
null_value
position_increment_gap
precision_step
properties
search_analyzer
similarity
store
term_vector
- Dynamic Mapping
- Transform
- Analysis
- Analyzers
- Tokenizers
- Token Filters
- Standard Token Filter
- ASCII Folding Token Filter
- Length Token Filter
- Lowercase Token Filter
- Uppercase Token Filter
- NGram Token Filter
- Edge NGram Token Filter
- Porter Stem Token Filter
- Shingle Token Filter
- Stop Token Filter
- Word Delimiter Token Filter
- Stemmer Token Filter
- Stemmer Override Token Filter
- Keyword Marker Token Filter
- Keyword Repeat Token Filter
- KStem Token Filter
- Snowball Token Filter
- Phonetic Token Filter
- Synonym Token Filter
- Compound Word Token Filter
- Reverse Token Filter
- Elision Token Filter
- Truncate Token Filter
- Unique Token Filter
- Pattern Capture Token Filter
- Pattern Replace Token Filter
- Trim Token Filter
- Limit Token Count Token Filter
- Hunspell Token Filter
- Common Grams Token Filter
- Normalization Token Filter
- CJK Width Token Filter
- CJK Bigram Token Filter
- Delimited Payload Token Filter
- Keep Words Token Filter
- Keep Types Token Filter
- Classic Token Filter
- Apostrophe Token Filter
- Character Filters
- ICU Analysis Plugin
- Modules
- Index Modules
- Testing
- Glossary of terms
- Release Notes
WARNING: Version 2.0 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Setting changes
editSetting changes
editCommand line flags
editCommand line flags using single dash notation must be now specified as the first arguments. For example if previously using:
./elasticsearch --node.name=test_node -Des.path.conf=/opt/elasticsearch/conf/test_node
This will now need to be changed to:
./elasticsearch -Des.path.conf=/opt/elasticsearch/conf/test_node --node.name=test_node
for the flag to take effect.
Scripting settings
editThe script.disable_dynamic
node setting has been replaced by fine-grained
script settings described in the scripting docs.
The following setting previously used to enable dynamic or inline scripts:
script.disable_dynamic: false
It should be replaced with the following two settings in elasticsearch.yml
that
achieve the same result:
script.inline: on script.indexed: on
Units required for time and byte-sized settings
editAny settings which accept time or byte values must now be specified with
units. For instance, it is too easy to set the refresh_interval
to 1
millisecond instead of 1 second:
PUT _settings { "index.refresh_interval": 1 }
In 2.0, the above request will throw an exception. Instead the refresh
interval should be set to "1s"
for one second.
Merge and merge throttling settings
editThe tiered merge policy is now the only supported merge policy. These settings have been removed:
-
index.merge.policy.type
-
index.merge.policy.min_merge_size
-
index.merge.policy.max_merge_size
-
index.merge.policy.merge_factor
-
index.merge.policy.max_merge_docs
-
index.merge.policy.calibrate_size_by_deletes
-
index.merge.policy.min_merge_docs
-
index.merge.policy.max_merge_docs
Merge throttling now uses a feedback loop to auto-throttle. These settings have been removed:
-
indices.store.throttle.type
-
indices.store.throttle.max_bytes_per_sec
-
index.store.throttle.type
-
index.store.throttle.max_bytes_per_sec
Shadow replica settings
editThe node.enable_custom_paths
setting has been removed and replaced by the
path.shared_data
setting to allow shadow replicas with custom paths to work
with the security manager. For example, if your previous configuration had:
node.enable_custom_paths: true
And you created an index using shadow replicas with index.data_path
set to
/opt/data/my_index
with the following:
PUT /my_index { "index": { "number_of_shards": 1, "number_of_replicas": 4, "data_path": "/opt/data/my_index", "shadow_replicas": true } }
For 2.0, you will need to set path.shared_data
to a parent directory of the
index’s data_path, so:
path.shared_data: /opt/data
Resource watcher settings renamed
editThe setting names for configuring the resource watcher have been renamed to prevent clashes with the watcher plugin
-
watcher.enabled
is nowresource.reload.enabled
-
watcher.interval
is nowresource.reload.interval
-
watcher.interval.low
is nowresource.reload.interval.low
-
watcher.interval.medium
is nowresource.reload.interval.medium
-
watcher.interval.high
is nowresource.reload.interval.high
index.gateway setting renamed
edit-
index.gateway.local.sync
is nowindex.translog.sync_interval
Hunspell dictionary configuration
editThe parameter indices.analysis.hunspell.dictionary.location
has been
removed, and <path.conf>/hunspell
is always used.
CORS allowed origins
editThe CORS allowed origins setting, http.cors.allow-origin
, no longer has a default value. Previously, the default value
was *
, which would allow CORS requests from any origin and is considered insecure. The http.cors.allow-origin
setting
should be specified with only the origins that should be allowed, like so:
http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
JSONP support
editJSONP callback support has now been removed. CORS should be used to access Elasticsearch over AJAX instead:
http.cors.enabled: true http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
In memory indices
editThe memory
/ ram
store (index.store.type
) option was removed in
Elasticsearch. In-memory indices are no longer supported.
Log messages truncated
editLog messages are now truncated at 10,000 characters. This can be changed in
the logging.yml
configuration file with the file.layout.conversionPattern
setting.
Custom config file
editIt is no longer possible to specify a custom config file with the CONF_FILE
environment variable, or the -Des.config
, -Des.default.config
, or
-Delasticsearch.config
parameters.
Instead, the config file must be named elasticsearch.yml
and must be located
in the default config/
directory, unless a custom config directory is specified.
The location of a custom config directory may be specified as follows:
./bin/elasticsearch --path.conf=/path/to/conf/dir ./bin/plugin -Des.path.conf=/path/to/conf/dir install analysis-icu
When using the RPM or debian packages, the plugin script and the
init/service scripts will consult the CONF_DIR
environment variable
to check for a custom config location. The value of the CONF_DIR
variable can be set in the environment config file which is located either in
/etc/default/elasticsearch
or /etc/sysconfig/elasticsearch
.
Custom analysis file paths
editIt is no longer possible to set custom file path outside CONF_DIR
for *_path
settings
in char or token filters.
You must specify either relative path to CONF_DIR
location or absolute path inside CONF_DIR
location.
ES_CLASSPATH removed
editThe ES_CLASSPATH
environment variable is no longer used to set the class
path. External libraries should preferably be loaded using the plugin
mechanism or, if you really must, be copied to the lib/
directory.
On this page
- Command line flags
- Scripting settings
- Units required for time and byte-sized settings
- Merge and merge throttling settings
- Shadow replica settings
- Resource watcher settings renamed
- index.gateway setting renamed
- Hunspell dictionary configuration
- CORS allowed origins
- JSONP support
- In memory indices
- Log messages truncated
- Custom config file
- Custom analysis file paths
ES_CLASSPATH removed
ElasticON events are back!
Learn about the Elastic Search AI Platform from the experts at our live events.
Register now