WARNING: Version 2.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 changes
editSearch changes
editsearch_type=scan
deprecated
editThe scan
search type has been deprecated. All benefits from this search
type can now be achieved by doing a scroll request that sorts documents in
_doc
order, for instance:
GET /my_index/_search?scroll=2m { "sort": [ "_doc" ] }
Scroll requests sorted by _doc
have been optimized to more efficiently resume
from where the previous request stopped, so this will have the same performance
characteristics as the former scan
search type.
search_type=count
deprecated
editThe count
search type has been deprecated. All benefits from this search
type can now be achieved by setting size
to 0
, for instance:
GET /my_index/_search { "aggs": {...}, "size": 0 }
from + size limits
editElasticsearch will now return an error message if a query’s from
+ size
is
more than the index.max_result_window
parameter. This parameter defaults to
10,000 which is safe for almost all clusters. Values higher than can consume
significant chunks of heap memory per search and per shard executing the
search. It’s safest to leave this value as it is an use the scroll api for any
deep scrolling but this setting is dynamic so it can raised or lowered as
needed.
Nested sorting
editIf sorting on field inside a nested object then the nested_path
should be specified.
Before there was an attempt to resolve the nested path automatically, but that was sometimes incorrect.
To avoid confusion the nested_path
should always be specified.
More Like This
editThe MoreLikeThisQueryBuilder#ignoreLike methods have been deprecated in favor of using the unlike methods.
MoreLikeThisBuilder#addItem has been deprecated in favor of using MoreLikeThisBuilder#addLikeItem.