Changelog¶
7.2.0 (2020-05-04)¶
- Added support for
geotile_gridaggregation (#1350, contributed by @owrcasstevens) - Added the
DenseVectorandSparseVectordata types (#1278) - Added the
SearchAsYouTypefield (#1295, contributed by @dpasqualin) - Fixed name of
DoubleRange(#1272, contributed by @braunsonm)
7.1.0 (2019-10-23)¶
- Optimistic concurrent control for Document.delete
- Removing deprecated
DocType - Proper count caching for ES 7.x
- Support for
multiplexertoken filter - Don’t substitute for
__inFacetedSearch
7.0.0 (2019-04-26)¶
- Compatibility with Elasticsearch 7.x
Document.save()now returns"created"or"updated"- Dropped support for Python 2.6, 3.2, and 3.3
- When using
fieldsthe values are no longer merged into the body of the document and have to be accessed via.meta.fieldsonly
6.4.0 (2019-04-26)¶
Index.documentnow correctly sets theDocument’s_indexonly when using default index (#1091)Documentinheritance allows overridingObjectandNestedfield metadata likedynamic- adding
auto_date_histogramaggregation - Do not change data in place when (de)serializing
6.3.1 (2018-12-05)¶
Analyzer.simulatenow supports built-in analyzers- proper (de)serialization of the
Rangewrapper - Added
search_analyzertoCompletionfield
6.3.0 (2018-11-21)¶
- Fixed logic around defining a different
doc_typename. - Added
retry_on_conflictparameter toDocument.update. - fields defined on an index are now used to (de)serialize the data even when
not defined on a
Document - Allow
Index.analyzerto construct the analyzer - Detect conflict in analyzer definitions when calling
Index.analyzer - Detect conflicting mappings when creating an index
- Add
simulatemethod toanalyzerobject to test the analyzer using the_analyzeAPI. - Add
scriptandscript_idoptions toDocument.update Facetcan now use other metric thandoc_countRangeobjects to help with storing and working with_rangefields- Improved behavior of
Index.savewhere it does a better job when index already exists - Composite aggregations now correctly support multiple
sourcesaggs UpdateByQueryimplementated by @emarcey
6.2.1 (2018-07-03)¶
- allow users to redefine
doc_typeinIndex(#929) - include
DocTypeinelasticsearch_dslmodule directly (#930)
6.2.0 (2018-07-03)¶
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.
Percolatorfield now expectsQueryobjects as values- you can no longer access meta fields on a
Documentinstance by specifying._idor similar. Instead all access needs to happen via the.metaattribute. - Implemented
NestedFacetforFacetedSearch. This brought a need to slightly change the semantics ofFacet.get_valueswhich 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.updatenow supportsrefreshkwargDslBase._clonenow produces a shallow copy, this means that modifying an existing query can have effects on existingSearchobjects.- Empty
Searchno longer defaults tomatch_allquery and instead leaves thequerykey empty. This is backwards incompatible when usingsuggest.
6.1.0 (2018-01-09)¶
- Removed
Stringfield. - Fixed issue with
Object/Nesteddeserialization
6.0.1 (2018-01-02)¶
Fixing wheel package for Python 2.7 (#803)
6.0.0 (2018-01-01)¶
Backwards incompatible release compatible with elasticsearch 6.0, changes include:
use
docas defaultDocTypename, this change includes: *DocType._doc_type.matchesmethod is now used to determine whichDocTypeshould be used for a hit instead of just checking_type
NestedandObjectfield refactoring using newly introducedInnerDocclass. To define aNested/Objectfield just define theInnerDocsubclass and then use it when defining the field:class Comment(InnerDoc): body = Text() created_at = Date() class Blog(DocType): comments = Nested(Comment)methods on
connectionssingleton are now exposed on theconnectionsmodule directly.field values are now only deserialized when coming from elasticsearch (via
from_esmethod) and not when assigning values in python (either by direct assignment or in__init__).
5.4.0 (2017-12-06)¶
- fix
ip_rangeaggregation and rename the class toIPRange.Iprangeis kept for bw compatibility- fix bug in loading an aggregation with meta data from dict
- add support for
normalizerparameter ofKeywordfieldsIndexTemplatecan now be specified using the same API asIndexBooleanfield now accepts"false"asFalse
5.3.0 (2017-05-18)¶
- fix constant score query definition
DateHistogramFacetnow works withdatetimeobjects- respect
__in field names when creating queries from dict
5.2.0 (2017-03-26)¶
- make sure all response structers are pickleable (for caching)
- adding
excludetoSearch- fix metric aggregation deserialization
- expose all index-level APIs on
Indexclass- adding
deletetoSearchwhich callsdelete_by_queryAPI
5.1.0 (2017-01-08)¶
- Renamed
ResultandResultMetatoHitandHitMetarespectivelyResponsenow storesSearchwhich it gets as first arg to__init__- aggregation results are now wrapped in classes and properly deserialized
Datefields now allow for numerical timestamps in the java format (in millis)- Added API documentation
- replaced generated classes with manually created
5.0.0 (2016-11-04)¶
Version compatible with elasticsearch 5.0.
Breaking changes:
Stringfield type has been deprecated in favor ofTextandKeywordfieldsmethod has been removed in favor ofsourcefiltering
2.2.0 (2016-11-04)¶
- accessing missing string fields no longer returnd
''but returnsNoneinstead.- fix issues with bool’s
|and&operators andminimum_should_match
2.1.0 (2016-06-29)¶
inner_hitsare now also wrapped inResponse+operator is deprecated,.query()now uses&to combine queries- added
mgetmethod toDocType- fixed validation for “empty” values like
''and[]
2.0.0 (2016-02-18)¶
Compatibility with Elasticsearch 2.x:
- Filters have been removed and additional queries have been added. Instead of
Fobjects you can now useQ.Search.filteris now just a shortcut to add queries in filter context- support for pipeline aggregations added
Backwards incompatible changes:
- list of analysis objects and classes was removed, any string used as tokenizer, char or token filter or analyzer will be treated as a builtin
- internal method
Field.to_pythonhas been renamed todeserializeand an optional serialization mechanic for fields has been added.- Custom response class is now set by
response_classmethod instead of a kwarg toSearch.execute
Other changes:
FacetedSearchnow supports pagination via slicing
0.0.10 (2016-01-24)¶
Searchcan now be iterated over to get back hitsSearchnow caches responses from ElasticsearchDateHistogramFacetnow defaults to returning empty intervalsSearchno longer accepts positional parameters- Experimental
MultiSearchAPI- added option to talk to
_suggestendpoint (execute_suggest)
0.0.9 (2015-10-26)¶
FacetedSearchnow uses its ownFacetclass instead of built in aggregations
0.0.8 (2015-08-28)¶
0.0.5and0.0.6was released with broken .tar.gz on pypi, just a build fix
0.0.5 (2015-08-27)¶
- added support for (index/search)_analyzer via #143, thanks @wkiser!
- even keys accessed via
['field']onAttrDictwill be wrapped inAttr[Dict|List]for consistency- Added a convenient option to specify a custom
doc_classto wrap inner/Nested documentsblankoption has been removedAttributeErroris no longer raised when accessing an empty field.- added
requiredflag to fields and validation hooks to fields and (sub)documents- removed
getmethod fromAttrDict. Usegetattr(d, key, default)instead.- added
FacetedSearchfor easy declarative faceted navigation
0.0.4 (2015-04-24)¶
- Metadata fields (such as id, parent, index, version etc) must be stored (and retrieved) using the
metaattribute (#58) on bothResultandDocTypeobjects or using their underscored variants (_id,_parentetc)- query on Search can now be directly assigned
suggestmethod added toSearchSearch.doc_typenow acceptsDocTypesubclasses directlyProperties.propertymethod renamed tofieldfor consistency- Date field now raises
ValidationExceptionon incorrect data
0.0.3 (2015-01-23)¶
Added persistence layer (Mapping and DocType), various fixes and
improvements.
0.0.2 (2014-08-27)¶
Fix for python 2
0.0.1 (2014-08-27)¶
Initial release.