- This package has been added to the Elasticsearch Python client. Development continues there. Consult the migration documentation for more details. (#1972)
- Added support for the
pointandshapefields (#1963) - Corrected typing hints for the
FunctionScorequery (#1960)
- Added support for quantized dense vector options (#1948)
- Added support for composable index templates (#1943)
- Support pipe syntax to declare optional document fields (#1937)
- Ignore document attributes typed with
ClassVar(#1936) - Support Python 3.13 (#1938)
- Fixed the use of dictionaries as values in
Termsquery (#1920)
- Fixed regression introduced in
Termsquery class (#1907) - Removed unnecessary
filterargument inAggBase.__getitem__(#1903) - Fixed deserialization of
datetime.datefields (#1914)
- Added support for any iterables to The
Termsquery (#1887) - Added back support for tuples and other iterables to
Search.source()method (#1895) - Added recursive option to
AttrDict.to_dict()(#1892) - Removed unused analyzer from search as you type example (#1883)
- Added support for the
semantic_textfield andsemanticquery type (#1881) - Removed extra
__orig_class__attribute in aggregation responses (#1877)
- Added the option to use Python types to declare document fields (#1845)
- Added type annotations (#1533)
- Added support for bulk document operations with
Document.bulk()(#1864) - Added the
ConstantKeywordfield to the top-level package (#1843) - Added
async_connectionsto the top-level package (#1865) - Added index creation to the aggregations example (#1862)
- Added
text_expansionquery clause (#1837) - Added
Response.search_after()andSearch.search_after()methods for efficient iteration (#1829) - Added point in time support and the
iterate()method in theSearchclass (#1833) - Added support for slicing multiple times in
Searchclass (#1771) Added support for regular expressions inCompletion.suggest()(#1836) - Fixed
suggest()method of theCompletionclass to format requests correctly. (#1836) - Fixed
Document.update()to accept fields set toNoneor empty (#1820)
- Added support for
knnas a query option (#1770) - Made the
dimsattribute of the dense vector type optional (#1776) - Added missing
inner_hitsoption tosearch.knn()method (#1777) - Added support for detecting document updates in
InnerDocattributes (#1535) - Changed
_expand__to_dotsetting to resolve at runtime (#1633) - Added explicit error message when unsupported
minimum_should_matchvalues are used (#1774) - Added the
EmptySearchclass (#1780) - Added
paramsoption to theFacetedSearchobject (#1500) - Added support for passing a dictionary in the
scriptoption for a document update (#1560) - Added
keys()anditems()methods toAttrDictclass (#1784) - Added a
to_list()method to theAttrListclass (#1584) - Fixed various documentation issues and typos (#1769, #1615, #1585, #1318, #1223)
- Added a vector search example (#1778)
- Added
asynciosupport (#1714) - Dropped support for Python 3.7 (#1717)
- Stopped mixing body and parameters in
UpdateByQuery(#1702)
- Added
Search.knn()method (#1691) - Added
Search.rank()method (undocumented as it still is in technical preview) (#1692) - Fixed importing collapse from dictionary (#1689)
- 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
MultiTermsaggregation (#1543, contributed by @Telomeraz) - Added the
CombinedFieldsquery (#1557, contributed by @Telomeraz)
- Fixed
DeprecationWarningsthat would be emitted from deprecated usages of thebodyparameter in the Python Elasticsearch client.
- Added the
ConstantKeyword,RankFeaturesfield types (#1456, #1465) - Added the
ScriptScorequery type (#1464) - Added
UpdateByQueryResponse.success()method (#1463) - Added
return_doc_metaparameter toDocument.save()andDocument.update()for accessing the complete API response (#1466) - Added support for
calendar_intervalandfixed_intervaltoDateHistogramFacet(#1467) - Added
Document.exists()method (#1447, contributed by @dem4ply) - Added support for the
yearinterval toDateHistogramFacet(#1502, contributed by @nrsimha) - Fixed issue where
to_dict()should be called recursively onSearch.extrasand**kwargs(#1458) - Fixed inverse of an empty
Boolquery should beMatchNone(#1459) - Fixed issue between
retry_on_conflictand optimistic concurrency control withinDocument.update()(#1461, contributed by @armando1793)
- Added
Intervals,MatchBoolPrefix,Shape, andWrapperqueries (#1392, #1418) - Added
Boxplot,RareTerms,VariableWidthHistogram,MedianAbsoluteDeviation,TTest,CumulativeCardinality,Inference,MovingPercentiles, andNormalizeaggregations (#1416, #1418) - Added
__all__and removed all star imports fromelasticsearch_dslnamespace to avoid leaking unintended names (#1390) - Fixed an issue where
ObjectandNestedcould mutate the innerdoc_classmapping (#1255, contributed by @l1nd3r0th) - Fixed a typo in query
SpanContaining, previously wasSpanContainining(#1418)
- Fixed issue when slicing a Search that would result in a negative
sizeinstead of asizeof 0. (#1360, contributed by @bk-equityzen)
- 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)
- 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
- 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
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
Analyzer.simulatenow supports built-in analyzers- proper (de)serialization of the
Rangewrapper - Added
search_analyzertoCompletionfield
- 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 UpdateByQueryimplemented by @emarcey
- allow users to redefine
doc_typeinIndex(#929) - include
DocTypeinelasticsearch_dslmodule 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.
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.
- Removed
Stringfield. - Fixed issue with
Object/Nesteddeserialization
Fixing wheel package for Python 2.7 (#803)
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__).
- 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
- fix constant score query definition
DateHistogramFacetnow works withdatetimeobjects- respect
__in field names when creating queries from dict
- 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
- 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
Version compatible with elasticsearch 5.0.
Breaking changes:
Stringfield type has been deprecated in favor ofTextandKeywordfieldsmethod has been removed in favor ofsourcefiltering
- accessing missing string fields no longer returned
''but returnsNoneinstead.- fix issues with bool's
|and&operators andminimum_should_match
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[]
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
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)
FacetedSearchnow uses its ownFacetclass instead of built in aggregations
0.0.5and0.0.6was 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']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
- 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
Added persistence layer (Mapping and DocType), various fixes and
improvements.
Fix for python 2
Initial release.