- Elasticsearch Guide: other versions:
- Getting Started
- Set up Elasticsearch
- Installing Elasticsearch
- Configuring Elasticsearch
- Important Elasticsearch configuration
- Important System Configuration
- Bootstrap Checks
- Heap size check
- File descriptor check
- Memory lock check
- Maximum number of threads check
- Maximum size virtual memory check
- Max file size check
- Maximum map count check
- Client JVM check
- Use serial collector check
- System call filter check
- OnError and OnOutOfMemoryError checks
- Early-access check
- G1GC check
- Stopping Elasticsearch
- Upgrade Elasticsearch
- Set up X-Pack
- Breaking changes
- Breaking changes in 6.0
- Aggregations changes
- Analysis changes
- Cat API changes
- Clients changes
- Cluster changes
- Document API changes
- Indices changes
- Ingest changes
- Java API changes
- Mapping changes
- Packaging changes
- Percolator changes
- Plugins changes
- Reindex changes
- REST changes
- Scripting changes
- Search and Query DSL changes
- Settings changes
- Stats and info changes
- Breaking changes in 6.1
- Breaking changes in 6.0
- X-Pack Breaking Changes
- API Conventions
- Document APIs
- Search APIs
- Aggregations
- Metrics Aggregations
- Avg Aggregation
- Cardinality Aggregation
- Extended Stats Aggregation
- Geo Bounds Aggregation
- Geo Centroid Aggregation
- Max Aggregation
- Min Aggregation
- Percentiles Aggregation
- Percentile Ranks Aggregation
- Scripted Metric Aggregation
- Stats Aggregation
- Sum Aggregation
- Top Hits Aggregation
- Value Count Aggregation
- Bucket Aggregations
- Adjacency Matrix Aggregation
- Children Aggregation
- Composite Aggregation
- Date Histogram Aggregation
- Date Range Aggregation
- Diversified Sampler Aggregation
- Filter Aggregation
- Filters Aggregation
- Geo Distance Aggregation
- GeoHash grid Aggregation
- Global Aggregation
- Histogram Aggregation
- IP Range Aggregation
- Missing Aggregation
- Nested Aggregation
- Range Aggregation
- Reverse nested Aggregation
- Sampler Aggregation
- Significant Terms Aggregation
- Significant Text Aggregation
- Terms Aggregation
- Pipeline Aggregations
- Avg Bucket Aggregation
- Derivative Aggregation
- Max Bucket Aggregation
- Min Bucket Aggregation
- Sum Bucket Aggregation
- Stats Bucket Aggregation
- Extended Stats Bucket Aggregation
- Percentiles Bucket Aggregation
- Moving Average Aggregation
- Cumulative Sum Aggregation
- Bucket Script Aggregation
- Bucket Selector Aggregation
- Bucket Sort Aggregation
- Serial Differencing Aggregation
- Matrix Aggregations
- Caching heavy aggregations
- Returning only aggregation results
- Aggregation Metadata
- Returning the type of the aggregation
- Metrics Aggregations
- Indices APIs
- Create Index
- Delete Index
- Get Index
- Indices Exists
- Open / Close Index API
- Shrink Index
- Split Index
- Rollover Index
- Put Mapping
- Get Mapping
- Get Field Mapping
- Types Exists
- Index Aliases
- Update Indices Settings
- Get Settings
- Analyze
- Index Templates
- Indices Stats
- Indices Segments
- Indices Recovery
- Indices Shard Stores
- Clear Cache
- Flush
- Refresh
- Force Merge
- cat APIs
- Cluster APIs
- Query DSL
- Mapping
- Analysis
- Anatomy of an analyzer
- Testing analyzers
- Analyzers
- Normalizers
- Tokenizers
- Token Filters
- Standard Token Filter
- ASCII Folding Token Filter
- Flatten Graph 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
- Word Delimiter Graph 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
- Synonym Graph Token Filter
- Compound Word Token Filters
- 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
- Decimal Digit Token Filter
- Fingerprint Token Filter
- Minhash Token Filter
- Character Filters
- Modules
- Index Modules
- Ingest Node
- Pipeline Definition
- Ingest APIs
- Accessing Data in Pipelines
- Handling Failures in Pipelines
- Processors
- Append Processor
- Convert Processor
- Date Processor
- Date Index Name Processor
- Fail Processor
- Foreach Processor
- Grok Processor
- Gsub Processor
- Join Processor
- JSON Processor
- KV Processor
- Lowercase Processor
- Remove Processor
- Rename Processor
- Script Processor
- Set Processor
- Split Processor
- Sort Processor
- Trim Processor
- Uppercase Processor
- Dot Expander Processor
- URL Decode Processor
- Monitoring Elasticsearch
- X-Pack APIs
- Info API
- Explore API
- Machine Learning APIs
- Close Jobs
- Create Datafeeds
- Create Jobs
- Delete Datafeeds
- Delete Jobs
- Delete Model Snapshots
- Flush Jobs
- Forecast Jobs
- Get Buckets
- Get Overall Buckets
- Get Categories
- Get Datafeeds
- Get Datafeed Statistics
- Get Influencers
- Get Jobs
- Get Job Statistics
- Get Model Snapshots
- Get Records
- Open Jobs
- Post Data to Jobs
- Preview Datafeeds
- Revert Model Snapshots
- Start Datafeeds
- Stop Datafeeds
- Update Datafeeds
- Update Jobs
- Update Model Snapshots
- Security APIs
- Watcher APIs
- Migration APIs
- Deprecation Info APIs
- Definitions
- X-Pack Commands
- How To
- Testing
- Glossary of terms
- Release Notes
- 6.1.4 Release Notes
- 6.1.3 Release Notes
- 6.1.2 Release Notes
- 6.1.1 Release Notes
- 6.1.0 Release Notes
- 6.0.1 Release Notes
- 6.0.0 Release Notes
- 6.0.0-rc2 Release Notes
- 6.0.0-rc1 Release Notes
- 6.0.0-beta2 Release Notes
- 6.0.0-beta1 Release Notes
- 6.0.0-alpha2 Release Notes
- 6.0.0-alpha1 Release Notes
- 6.0.0-alpha1 Release Notes (Changes previously released in 5.x)
- X-Pack Release Notes
WARNING: Version 6.1 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.
Search and Query DSL changes
editSearch and Query DSL changes
editChanges to queries
edit-
The
collect_payloads
parameter of thespan_near
query has been removed. Payloads will be loaded when needed. -
Queries on boolean fields now strictly parse boolean-like values. This means
only the strings
"true"
and"false"
will be parsed into their boolean counterparts. Other strings will cause an error to be thrown. -
The
in
query (a synonym for theterms
query) has been removed -
The
geo_bbox
query (a synonym for thegeo_bounding_box
query) has been removed -
The
mlt
query (a synonym for themore_like_this
query) has been removed. -
The deprecated
like_text
,ids
anddocs
parameters (all synonyms forlike
) of themore_like_this
query have been removed. Also the deprecatedmin_word_len
(a synonym formin_word_length
) andmax_word_len
(a synonym formax_word_length
) have been removed. -
The
fuzzy_match
andmatch_fuzzy
query (synonyma for thematch
query) have been removed -
The
terms
query now always returns scores equal to1
and is not subject toindices.query.bool.max_clause_count
anymore. -
The deprecated
indices
query has been removed. -
Support for empty query objects (
{ }
) has been removed from the query DSL. An error is thrown whenever an empty query object is provided. -
The deprecated
minimum_number_should_match
parameter in thebool
query has been removed, useminimum_should_match
instead. -
The
query_string
query now correctly parses the maximum number of states allowed when determinizing a regex asmax_determinized_states
instead of the typomax_determined_states
. -
The
query_string
query no longer acceptsenable_position_increment
, useenable_position_increments
instead. -
For
geo_distance
queries, sorting, and aggregations thesloppy_arc
option has been removed from thedistance_type
parameter. -
The
geo_distance_range
query, which was deprecated in 5.0, has been removed. -
The
optimize_bbox
parameter has been removed fromgeo_distance
queries. -
The
ignore_malformed
andcoerce
parameters have been removed fromgeo_bounding_box
,geo_polygon
, andgeo_distance
queries. -
The
disable_coord
parameter of thebool
andcommon_terms
queries has been removed. If provided, it will be ignored and issue a deprecation warning. -
The
template
query has been removed. This query was deprecated since 5.0 -
The
percolate
query’sdocument_type
has been deprecated. From 6.0 and later it is no longer required to specify thedocument_type
parameter. -
The
split_on_whitespace
parameter for thequery_string
query has been removed. If provided, it will be ignored and issue a deprecation warning. Thequery_string
query now splits on operator only. -
The
use_dis_max
parameter for thequery_string
query has been removed. If provided, it will be ignored and issue a deprecation warning. Thetie_breaker
parameter must be used instead. -
The
auto_generate_phrase_queries
parameter for thequery_string
query has been removed, use an explicit quoted query instead. If provided, it will be ignored and issue a deprecation warning. -
The
all_fields
parameter for thequery_string
andsimple_query_string
has been removed. Setdefault_field
to *` instead. If provided,default_field
will be automatically set to*
-
The
index
parameter in the terms filter, used to look up terms in a dedicated index is now mandatory. Previously, the index defaulted to the index the query was executed on. Now this index must be explicitly set in the request. -
The deprecated
type
andslop
parameter for thematch
query have been removed. Instead of setting thetype
, thematch_phrase
ormatch_phrase_prefix
should be used. Theslop
removed from thematch
query but is supported formatch_phrase
andmatch_phrase_prefix
. -
The deprecated
phrase_slop
parameter (a synonym for theslop
parameter) of thematch_phrase
query has been removed. -
The deprecated
query
parameter (a synonym for thefilter
parameter) of theconstant_score
query has been removed. -
The deprecated
phrase_slop
parameter (a synonym for theslop
parameter) of themulti_match
query has been removed. -
The deprecated
prefix
parameter (a synonym for thevalue
parameter) of theprefix
query has been removed. -
The deprecated
le
(a synonym forlte
) andge
(a synonym forgte
) parameter of therange
query have been removed. -
The deprecated
types
and_type
synonyms for thetype
parameter of theids
query have been removed -
The deprecated multi term rewrite parameters
constant_score_auto
,constant_score_filter
(synonyms forconstant_score
) have been removed.
Search shards API
editThe search shards API no longer accepts the type
url parameter, which didn’t
have any effect in previous versions.
Changes to the Profile API
editThe "time"
field showing human readable timing output has been replaced by the "time_in_nanos"
field which displays the elapsed time in nanoseconds. The "time"
field can be turned on by adding
"?human=true"
to the request url. It will display a rounded, human readable time value.
Scoring changes
editQuery normalization
editQuery normalization has been removed. This means that the TF-IDF similarity no longer tries to make scores comparable across queries and that boosts are now integrated into scores as simple multiplicative factors.
Other similarities are not affected as they did not normalize scores and already integrated boosts into scores as multiplicative factors.
See LUCENE-7347
for more
information.
Coordination factors
editCoordination factors have been removed from the scoring formula. This means that boolean queries no longer score based on the number of matching clauses. Instead, they always return the sum of the scores of the matching clauses.
As a consequence, use of the TF-IDF similarity is now discouraged as this was an important component of the quality of the scores that this similarity produces. BM25 is recommended instead.
See LUCENE-7347
for more
information.
Fielddata on _uid
editFielddata on _uid
is deprecated. It is possible to switch to _id
instead
but the only reason why it has not been deprecated too is because it is used
for the random_score
function. If you really need access to the id of
documents for sorting, aggregations or search scripts, the recommendation is
to duplicate the id as a field in the document.
Highlighters
editThe unified
highlighter is the new default choice for highlighter.
The offset strategy for each field is picked internally by this highlighter depending on the
type of the field (index_options
).
It is still possible to force the highlighter to fvh
or plain
types.
The postings
highlighter has been removed from Lucene and Elasticsearch.
The unified
highlighter outputs the same highlighting when index_options
is set
to offsets
.
fielddata_fields
editThe deprecated fielddata_fields
have now been removed. docvalue_fields
should be used instead.
docvalue_fields
editdocvalue_fields
now have a default upper limit of 100 fields that can be requested.
This limit can be overridden by using the index.max_docvalue_fields_search
index setting.
script_fields
editscript_fields
now have a default upper limit of 32 script fields that can be requested.
This limit can be overridden by using the index.max_script_fields
index setting.
Inner hits
editThe source inside a hit of inner hits keeps its full path with respect to the entire source. In prior versions the source field names were relative to the inner hit.
Scroll
editThe from
parameter can no longer be used in the search request body when initiating a scroll.
The parameter was already ignored in these situations, now in addition an error is thrown.
Limit on from/size in top hits and inner hits
editThe maximum number of results (from
+ size
) that is allowed to be retrieved
via inner hits and top hits has been limited to 100. The limit can be controlled
via the index.max_inner_result_window
index setting.
Scroll queries that use the request_cache are deprecated
editSetting request_cache:true
on a query that creates a scroll ('scroll=1m`)
is deprecated and the request will not use the cache internally.
In future versions we will return a 400 - Bad request
instead of just ignoring
the hint.
Scroll queries are not meant to be cached.
On this page
- Changes to queries
- Search shards API
- Changes to the Profile API
- Scoring changes
- Query normalization
- Coordination factors
- Fielddata on
_uid
- Highlighters
fielddata_fields
docvalue_fields
script_fields
- Inner hits
- Scroll
- Limit on from/size in top hits and inner hits
- Scroll queries that use the request_cache are deprecated