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 the DocType class and renamed it to ๐Ÿ‘ Document. The primary motivation for this was the support for types being โฌ‡๏ธ dropped from elasticsearch itself in 7.x - we needed to somehow link the Index and Document classes. To do this we split the options that were previously defined in the class Meta between it and newly introduced class Index. The split is that all options that were tied to mappings (like setting dynamic = MetaField('strict')) remain in class Meta and all options for index definition (like settings, name, or aliases) got ๐Ÿšš moved to the new class 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 for Document which will be removed in 7.x. It does, however, work in the new way which is not fully backwards compatible.

    • Percolator field now expects Query 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 for FacetedSearch. This brought a need to slightly change the semantics of Facet.get_values which now expects the whole data dict for the aggregation, not just the buckets. This is a backwards incompatible change for custom aggregations that redefine that method.
    • โšก๏ธ Document.update now supports refresh kwarg
    • ๐Ÿ‘ฏ DslBase._clone now produces a shallow copy, this means that modifying an existing query can have effects on existing Search objects.
    • 0๏ธโƒฃ Empty Search no longer defaults to match_all query and instead leaves the query key empty. This is backwards incompatible when using suggest.