Analyzer.simulate
now supports built-in analyzers- proper (de)serialization of the
Range
wrapper - Added
search_analyzer
toCompletion
field
- 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 analyzer - Detect 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
fields- Improved behavior of
Index.save
where it does a better job when index already exists - Composite aggregations now correctly support multiple
sources
aggs UpdateByQuery
implementated by @emarcey
- allow users to redefine
doc_type
inIndex
(#929
) - include
DocType
inelasticsearch_dsl
module directly (#930
)
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 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
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
.
- Removed
String
field. - Fixed issue with
Object
/Nested
deserialization
Fixing wheel package for Python 2.7 (#803)
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__
).
- fix
ip_range
aggregation and rename the class toIPRange
.Iprange
is kept for bw compatibility- fix bug in loading an aggregation with meta data from dict
- add support for
normalizer
parameter ofKeyword
fieldsIndexTemplate
can now be specified using the same API asIndex
Boolean
field now accepts"false"
asFalse
- fix constant score query definition
DateHistogramFacet
now works withdatetime
objects- respect
__
in field names when creating queries from dict
- make sure all response structers are pickleable (for caching)
- adding
exclude
toSearch
- fix metric aggregation deserialization
- expose all index-level APIs on
Index
class- adding
delete
toSearch
which callsdelete_by_query
API
- Renamed
Result
andResultMeta
toHit
andHitMeta
respectivelyResponse
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
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
- accessing missing string fields no longer returnd
''
but returnsNone
instead.- fix issues with bool's
|
and&
operators andminimum_should_match
inner_hits
are now also wrapped inResponse
+
operator is deprecated,.query()
now uses&
to combine queries- added
mget
method toDocType
- fixed validation for "empty" values like
''
and[]
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 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_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
Search
can now be iterated over to get back hitsSearch
now caches responses from ElasticsearchDateHistogramFacet
now defaults to returning empty intervalsSearch
no longer accepts positional parameters- Experimental
MultiSearch
API- added option to talk to
_suggest
endpoint (execute_suggest
)
FacetedSearch
now uses its ownFacet
class instead of built in aggregations
0.0.5
and0.0.6
was released with broken .tar.gz on pypi, just a build fix
- added support for (index/search)_analyzer via #143, thanks @wkiser!
- even keys accessed via
['field']
onAttrDict
will be wrapped inAttr[Dict|List]
for consistency- Added a convenient option to specify a custom
doc_class
to wrap inner/Nested documentsblank
option has been removedAttributeError
is no longer raised when accessing an empty field.- added
required
flag to fields and validation hooks to fields and (sub)documents- removed
get
method fromAttrDict
. Usegetattr(d, key, default)
instead.- added
FacetedSearch
for easy declarative faceted navigation
- 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 directlyProperties.property
method renamed tofield
for consistency- Date field now raises
ValidationException
on incorrect data
Added persistence layer (Mapping
and DocType
), various fixes and
improvements.
Fix for python 2
Initial release.