WARNING: Version 6.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.
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.