Skip to content

v0.8.1 — Raw search and API typing fixes

Latest

Choose a tag to compare

@wallneradam wallneradam released this 26 Oct 10:29

ESORM 0.8.1 adds raw search responses and fixes public API typing and several runtime edge cases.

New feature

  • Add ESModel.search_raw() to return the raw Elasticsearch/OpenSearch search response, including hit metadata and responses requested with _source=False. It supports builder queries, aggregations, model default sorting, and the Pagination and Sort decorators.

Fixes

  • Accept sequences of hosts, including tuples, in connect() and normalize them to the list expected by the clients.
  • Fix retry_on_conflict() when the decorated function is called with keyword arguments only, and preserve the decorated function's parameter and return types.
  • Make from_es() raise InvalidResponseError for an empty response instead of returning None; its return type now reflects that a valid response produces a model.
  • Avoid the Pydantic 2.11 deprecation warning when excluding computed fields from serialized documents.
  • Complete public API annotations for bulk operations, field types, connection helpers, and FastAPI utilities. Add strict pyright coverage to the type-checking tests.

Full changelog: v0.8.0...v0.8.1