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_payloadsparameter of thespan_nearquery 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
inquery (a synonym for thetermsquery) has been removed -
The
geo_bboxquery (a synonym for thegeo_bounding_boxquery) has been removed -
The
mltquery (a synonym for themore_like_thisquery) has been removed. -
The deprecated
like_text,idsanddocsparameters (all synonyms forlike) of themore_like_thisquery 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_matchandmatch_fuzzyquery (synonyma for thematchquery) have been removed -
The
termsquery now always returns scores equal to1and is not subject toindices.query.bool.max_clause_countanymore. -
The deprecated
indicesquery 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_matchparameter in theboolquery has been removed, useminimum_should_matchinstead. -
The
query_stringquery now correctly parses the maximum number of states allowed when determinizing a regex asmax_determinized_statesinstead of the typomax_determined_states. -
The
query_stringquery no longer acceptsenable_position_increment, useenable_position_incrementsinstead. -
For
geo_distancequeries, sorting, and aggregations thesloppy_arcoption has been removed from thedistance_typeparameter. -
The
geo_distance_rangequery, which was deprecated in 5.0, has been removed. -
The
optimize_bboxparameter has been removed fromgeo_distancequeries. -
The
ignore_malformedandcoerceparameters have been removed fromgeo_bounding_box,geo_polygon, andgeo_distancequeries. -
The
disable_coordparameter of theboolandcommon_termsqueries has been removed. If provided, it will be ignored and issue a deprecation warning. -
The
templatequery has been removed. This query was deprecated since 5.0 -
The
percolatequery’sdocument_typehas been deprecated. From 6.0 and later it is no longer required to specify thedocument_typeparameter. -
The
split_on_whitespaceparameter for thequery_stringquery has been removed. If provided, it will be ignored and issue a deprecation warning. Thequery_stringquery now splits on operator only. -
The
use_dis_maxparameter for thequery_stringquery has been removed. If provided, it will be ignored and issue a deprecation warning. Thetie_breakerparameter must be used instead. -
The
auto_generate_phrase_queriesparameter for thequery_stringquery has been removed, use an explicit quoted query instead. If provided, it will be ignored and issue a deprecation warning. -
The
all_fieldsparameter for thequery_stringandsimple_query_stringhas been removed. Setdefault_fieldto *` instead. If provided,default_fieldwill be automatically set to* -
The
indexparameter 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
typeandslopparameter for thematchquery have been removed. Instead of setting thetype, thematch_phraseormatch_phrase_prefixshould be used. Theslopremoved from thematchquery but is supported formatch_phraseandmatch_phrase_prefix. -
The deprecated
phrase_slopparameter (a synonym for theslopparameter) of thematch_phrasequery has been removed. -
The deprecated
queryparameter (a synonym for thefilterparameter) of theconstant_scorequery has been removed. -
The deprecated
phrase_slopparameter (a synonym for theslopparameter) of themulti_matchquery has been removed. -
The deprecated
prefixparameter (a synonym for thevalueparameter) of theprefixquery has been removed. -
The deprecated
le(a synonym forlte) andge(a synonym forgte) parameter of therangequery have been removed. -
The deprecated
typesand_typesynonyms for thetypeparameter of theidsquery 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.