elasticsearch-dsl-py v6.2.0 Release Notes
Release Date: 2018-07-03 // almost 6 years ago-
Backwards incompatible change -
DocType
refactoring.๐จ In
6.2.0
we refactored theDocType
class and renamed it to ๐Document
. The primary motivation for this was the support for types being โฌ๏ธ dropped from elasticsearch itself in7.x
- we needed to somehow link theIndex
andDocument
classes. To do this we split the options that were previously defined in theclass Meta
between it and newly introducedclass Index
. The split is that all options that were tied to mappings (like settingdynamic = MetaField('strict')
) remain inclass Meta
and all options for index definition (likesettings
,name
, oraliases
) got ๐ moved to the newclass Index
.๐ You can see some examples of the new functionality in the
examples
๐ directory. Documentation has been updated to reflect the new API.๐
DocType
is now just an alias forDocument
which will be removed in7.x
. It does, however, work in the new way which is not fully backwards compatible.Percolator
field now expectsQuery
objects as values- you can no longer access meta fields on a
Document
instance by specifying._id
or similar. Instead all access needs to happen via the.meta
attribute. - Implemented
NestedFacet
forFacetedSearch
. This brought a need to slightly change the semantics ofFacet.get_values
which now expects the whole data dict for the aggregation, not just thebuckets
. This is a backwards incompatible change for custom aggregations that redefine that method. - โก๏ธ
Document.update
now supportsrefresh
kwarg - ๐ฏ
DslBase._clone
now produces a shallow copy, this means that modifying an existing query can have effects on existingSearch
objects. - 0๏ธโฃ Empty
Search
no longer defaults tomatch_all
query and instead leaves thequery
key empty. This is backwards incompatible when usingsuggest
.