Changelog
8.13.1 (2024-04-30)
Added support for
knn
as a query option (#1770)Made the
dims
attribute of the dense vector type optional (#1776)Added missing
inner_hits
option tosearch.knn()
method (#1777)Added support for detecting document updates in
InnerDoc
attributes (#1535)Changed
_expand__to_dot
setting to resolve at runtime (#1633)Added explicit error message when unsupported
minimum_should_match
values are used (#1774)Added the
EmptySearch
class (#1780)Added
params
option to theFacetedSearch
object (#1500)Added support for passing a dictionary in the
script
option for a document update (#1560)Added
keys()
anditems()
methods toAttrDict
class (#1784)Added a
to_list()
method to theAttrList
class (#1584)Fixed various documentation issues and typos (#1769, #1615, #1585, #1318, #1223)
Added a vector search example (#1778)
8.13.0 (2024-04-03)
8.12.0 (2024-01-18)
8.11.0 (2023-11-13)
8.9.0 (2023-09-07)
Added Elasticsearch 8.x support (#1664)
Dropped support for Python 2.7 and 3.5 (#1606, contributed by @hugovk)
Added support for Python 3.10 and 3.11 (#1608, contributed by @hugovk)
Added the
MultiTerms
aggregation (#1543, contributed by @Telomeraz)Added the
CombinedFields
query (#1557, contributed by @Telomeraz)
7.4.1 (2023-03-01)
Fixed
DeprecationWarnings
that would be emitted from deprecated usages of thebody
parameter in the Python Elasticsearch client.
7.4.0 (2021-07-15)
Added the
ConstantKeyword
,RankFeatures
field types (#1456, #1465)Added the
ScriptScore
query type (#1464)Added
UpdateByQueryResponse.success()
method (#1463)Added
return_doc_meta
parameter toDocument.save()
andDocument.update()
for accessing the complete API response (#1466)Added support for
calendar_interval
andfixed_interval
toDateHistogramFacet
(#1467)Added
Document.exists()
method (#1447, contributed by @dem4ply)Added support for the
year
interval toDateHistogramFacet
(#1502, contributed by @nrsimha)Fixed issue where
to_dict()
should be called recursively onSearch.extras
and**kwargs
(#1458)Fixed inverse of an empty
Bool
query should beMatchNone
(#1459)Fixed issue between
retry_on_conflict
and optimistic concurrency control withinDocument.update()
(#1461, contributed by @armando1793)
7.3.0 (2020-09-16)
Added
Intervals
,MatchBoolPrefix
,Shape
, andWrapper
queries (#1392, #1418)Added
Boxplot
,RareTerms
,VariableWidthHistogram
,MedianAbsoluteDeviation
,TTest
,CumulativeCardinality
,Inference
,MovingPercentiles
, andNormalize
aggregations (#1416, #1418)Added
__all__
and removed all star imports fromelasticsearch_dsl
namespace to avoid leaking unintended names (#1390)Fixed an issue where
Object
andNested
could mutate the innerdoc_class
mapping (#1255, contributed by @l1nd3r0th)Fixed a typo in query
SpanContaining
, previously wasSpanContainining
(#1418)
7.2.1 (2020-06-02)
Fixed issue when slicing a Search that would result in a negative
size
instead of asize
of 0. (#1360, contributed by @bk-equityzen)
7.2.0 (2020-05-04)
Added support for
geotile_grid
aggregation (#1350, contributed by @owrcasstevens)Added the
DenseVector
andSparseVector
data types (#1278)Added the
SearchAsYouType
field (#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
multiplexer
token filterDon’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
fields
the values are no longer merged into the body of the document and have to be accessed via.meta.fields
only
6.4.0 (2019-04-26)
Index.document
now correctly sets theDocument
’s_index
only when using default index (#1091
)Document
inheritance allows overridingObject
andNested
field metadata likedynamic
adding
auto_date_histogram
aggregationDo not change data in place when (de)serializing
6.3.1 (2018-12-05)
Analyzer.simulate
now supports built-in analyzersproper (de)serialization of the
Range
wrapperAdded
search_analyzer
toCompletion
field
6.3.0 (2018-11-21)
Fixed logic around defining a different
doc_type
name.Added
retry_on_conflict
parameter toDocument.update
.fields defined on an index are now used to (de)serialize the data even when not defined on a
Document
Allow
Index.analyzer
to construct the analyzerDetect conflict in analyzer definitions when calling
Index.analyzer
Detect conflicting mappings when creating an index
Add
simulate
method toanalyzer
object to test the analyzer using the_analyze
API.Add
script
andscript_id
options toDocument.update
Facet
can now use other metric thandoc_count
Range
objects to help with storing and working with_range
fieldsImproved behavior of
Index.save
where it does a better job when index already existsComposite aggregations now correctly support multiple
sources
aggsUpdateByQuery
implemented by @emarcey
6.2.1 (2018-07-03)
allow users to redefine
doc_type
inIndex
(#929
)include
DocType
inelasticsearch_dsl
module 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.
Percolator
field now expectsQuery
objects as valuesyou 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
kwargDslBase._clone
now produces a shallow copy, this means that modifying an existing query can have effects on existingSearch
objects.Empty
Search
no longer defaults tomatch_all
query and instead leaves thequery
key empty. This is backwards incompatible when usingsuggest
.
6.1.0 (2018-01-09)
Removed
String
field.Fixed issue with
Object
/Nested
deserialization
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
doc
as defaultDocType
name, this change includes: *DocType._doc_type.matches
method is now used to determine whichDocType
should be used for a hit instead of just checking_type
Nested
andObject
field refactoring using newly introducedInnerDoc
class. To define aNested
/Object
field just define theInnerDoc
subclass and then use it when defining the field:class Comment(InnerDoc): body = Text() created_at = Date() class Blog(DocType): comments = Nested(Comment)methods on
connections
singleton are now exposed on theconnections
module directly.field values are now only deserialized when coming from elasticsearch (via
from_es
method) and not when assigning values in python (either by direct assignment or in__init__
).
5.4.0 (2017-12-06)
fix
ip_range
aggregation and rename the class toIPRange
.Iprange
is kept for bw compatibilityfix bug in loading an aggregation with meta data from dict
add support for
normalizer
parameter ofKeyword
fields
IndexTemplate
can now be specified using the same API asIndex
Boolean
field now accepts"false"
asFalse
5.3.0 (2017-05-18)
fix constant score query definition
DateHistogramFacet
now works withdatetime
objectsrespect
__
in field names when creating queries from dict
5.2.0 (2017-03-26)
make sure all response structers are pickleable (for caching)
adding
exclude
toSearch
fix metric aggregation deserialization
expose all index-level APIs on
Index
classadding
delete
toSearch
which callsdelete_by_query
API
5.1.0 (2017-01-08)
Renamed
Result
andResultMeta
toHit
andHitMeta
respectively
Response
now storesSearch
which it gets as first arg to__init__
aggregation results are now wrapped in classes and properly deserialized
Date
fields 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:
String
field type has been deprecated in favor ofText
andKeyword
fields
method has been removed in favor ofsource
filtering
2.2.0 (2016-11-04)
accessing missing string fields no longer returned
''
but returnsNone
instead.fix issues with bool’s
|
and&
operators andminimum_should_match
2.1.0 (2016-06-29)
inner_hits
are now also wrapped inResponse
+
operator is deprecated,.query()
now uses&
to combine queriesadded
mget
method 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
F
objects you can now useQ
.
Search.filter
is now just a shortcut to add queries in filter contextsupport 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_python
has been renamed todeserialize
and an optional serialization mechanic for fields has been added.Custom response class is now set by
response_class
method instead of a kwarg toSearch.execute
Other changes:
FacetedSearch
now supports pagination via slicing
0.0.10 (2016-01-24)
Search
can now be iterated over to get back hits
Search
now caches responses from Elasticsearch
DateHistogramFacet
now defaults to returning empty intervals
Search
no longer accepts positional parametersExperimental
MultiSearch
APIadded option to talk to
_suggest
endpoint (execute_suggest
)
0.0.9 (2015-10-26)
FacetedSearch
now uses its ownFacet
class instead of built in aggregations
0.0.8 (2015-08-28)
0.0.5
and0.0.6
was 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']
onAttrDict
will be wrapped inAttr[Dict|List]
for consistencyAdded a convenient option to specify a custom
doc_class
to wrap inner/Nested documents
blank
option has been removed
AttributeError
is no longer raised when accessing an empty field.added
required
flag to fields and validation hooks to fields and (sub)documentsremoved
get
method fromAttrDict
. Usegetattr(d, key, default)
instead.added
FacetedSearch
for 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
meta
attribute (#58) on bothResult
andDocType
objects or using their underscored variants (_id
,_parent
etc)query on Search can now be directly assigned
suggest
method added toSearch
Search.doc_type
now acceptsDocType
subclasses directly
Properties.property
method renamed tofield
for consistencyDate field now raises
ValidationException
on 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.