Skip to content
CAI
Software that uses CAICheck a score

Philippus/elastic4s

59.7

Adequate · 14 November 2026

26.7k

lines of production code

Scala

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add ZIO 1.0 JSON integration module

Introduces the \elastic4s-json-zio-1\ module, providing JSON serialization and deserialization support for ZIO 1.0 via \zio-json\. This adds implicit conversions that allow Elastic4s types like \Indexable\, \HitReader\, \AggReader\, and \ParamSerializer\ to automatically derive from \zio.json\ encoders and decoders, enabling seamless integration of ZIO-based JSON handling with Elastic4s operations.

elastic4s-json-zio-1 · high confidence

Add ZIO HTTP client implementation

Users can now use ZIO HTTP as the underlying transport for the elastic4s client. This change introduces a new \ZIOHttpClient\ that implements the \HttpClient\[Task\]\ interface, allowing integration with ZIO-based applications by mapping elastic4s requests to ZIO HTTP requests and responses. A corresponding test suite verifies basic connectivity, authentication header propagation, document indexing with special characters, and HEAD method support.

elastic4s-client-zio-http · high confidence

Add ZIO effect type class instances

The elastic4s-effect-zio module now provides implicit type class instances for ZIO, starting with a Functor implementation for zio.Task. This allows users to leverage ZIO's effect system within elastic4s operations, enabling seamless integration of ZIO-based error handling and effect composition.

elastic4s-effect-zio/src/main · high confidence

Add handler for reload search analyzers API

Users can now invoke the Elasticsearch reload search analyzers endpoint via the client. This change introduces the handler implementation that constructs the POST request to the /{index}/\_reload\_search\_analyzers endpoint and processes the HTTP response, mapping 200 and 404 status codes to successful responses while treating other codes as errors.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/reloadsearchanalyzers · high confidence

Add serverInfo request handler

A new handler for the MainRequest has been introduced, enabling the retrieval of server information. This handler constructs a GET request to the root endpoint (/) and processes the HTTP response, returning the parsed MainResponse on a 200 status code or raising an error for other status codes.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/main · high confidence

Add sttp4-based HTTP client implementation

Introduces a new \SttpRequestHttpClient\ in the \elastic4s-client-sttp4\ module, providing an HTTP client implementation backed by the sttp4 library. This allows users to configure the elastic4s client to use sttp4 for network communication, supporting standard HTTP methods and entity handling (string, byte array, file, and input stream). A corresponding test verifies that authentication headers are correctly propagated through this new client.

elastic4s-client-sttp4 · high confidence

Add support for Point-in-Time (PIT) API handlers

The library now includes handler implementations for the Elasticsearch Point-in-Time API, enabling users to create and delete PITs via the client. This change adds the \PitHandlers\ trait which registers HTTP request builders for creating a PIT on a specific index (supporting a \keep\_alive\ parameter) and deleting a PIT by ID, along with the necessary request/response types and JSON builder logic.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/pit · high confidence

Add zio-json support for JSON serialization and deserialization

Users can now use zio-json to serialize and deserialize data with elastic4s. This change introduces implicit conversions that allow types with zio-json encoders and decoders to be used as Indexable, HitReader, AggReader, and ParamSerializer instances, enabling seamless integration with the zio-json library for JSON handling.

elastic4s-json-zio · high confidence

Added HTTP client sample application

A new Scala example application (HttpClientExampleApp) has been added to the elastic4s HTTP client Gradle sample. This sample demonstrates how to initialize an ElasticClient, perform a bulk index operation with a wait-for-refresh policy, execute a search query, and handle the response.

samples/elastic4s-http-client-gradle · high confidence

Added JSON body builders for nested and parent-child search queries

The library now includes handlers to serialize \has\_child\, \has\_parent\, \nested\, and \parent\_id\ queries into Elasticsearch JSON. This includes support for \inner\_hits\ configuration in the nested and parent-child queries, allowing users to retrieve nested documents alongside their parents. The \InnerHitQueryBodyBuilder\ also supports standard search options like sorting, highlighting, and source filtering within these inner hits.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/nested · high confidence

Added Maven-based HTTP client sample project

A new sample project using Maven has been added to demonstrate the Elastic4s HTTP client. The included \HttpClientExampleApp\ shows how to initialize a client, perform bulk indexing, and execute a search query against a local Elasticsearch instance.

samples/elastic4s-http-client-maven · high confidence

Added Play JSON support for parameter serialization

The elastic4s-json-play module now includes an implicit ParamSerializer instance for Play JSON, allowing users to serialize case class parameters directly in script requests. This change enables seamless integration of Play's Writes typeclass for script parameters, complementing existing support for indexing and reading documents.

elastic4s-json-play · high confidence

Added ZIO 1.x Task functor instance

The elastic4s-effect-zio-1 module now provides a Cats Functor instance for ZIO's Task type, enabling seamless integration with Cats-based functional programming patterns. This addition allows users to map over ZIO tasks using standard Cats abstractions, with corresponding tests verifying the correct behavior of the mapping operation.

elastic4s-effect-zio-1 · high confidence

Added handlers for Get and Delete snapshot repository operations

The snapshot module now includes request handlers for retrieving (GET) and removing (DELETE) snapshot repositories, in addition to the existing support for creating, deleting, restoring, and querying snapshots. This enables users to manage snapshot repository configurations directly through the library's API.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/snapshot · high confidence

Added handlers for Index Lifecycle Management status, start, and stop operations

This change introduces the HTTP request and response handling logic for three new Index Lifecycle Management (ILM) endpoints: getting the ILM status, starting ILM, and stopping ILM. Users can now interact with these specific ILM control points via the client, with support for optional master\_timeout and timeout parameters on the start and stop actions.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/indexlifecyclemanagement · high confidence

Added handlers for getting and updating index settings

This change introduces the \SettingsHandlers\ trait, which provides the implementation for retrieving and modifying index settings in Elasticsearch. It adds a \GetSettingsHandler\ that constructs GET requests to the \/\_settings\ endpoint and parses the JSON response into a structured \IndexSettingsResponse\, and an \UpdateSettingsHandler\ that sends PUT requests to update index configurations. This enables users to programmatically query and adjust index-level settings via the client.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/settings · high confidence

Added pipeline aggregation support for Elasticsearch

The library now supports Elasticsearch pipeline aggregations, allowing users to perform calculations on the results of other aggregations. This change introduces case classes and builders for specific pipeline aggregations including AvgBucket, BucketScript, BucketSelector, BucketSort, CumulativeCardinality, CumulativeSum, Derivative, Diff, ExtendedStatsBucket, MaxBucket, MinBucket, MovFn, PercentilesBucket, SerialDiff, StatsBucket, and SumBucket. It also adds a GapPolicy enum to handle missing data in bucket paths and a PipelineAgg base trait for the DSL.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline · high confidence

Added search highlight and raw query handlers

New handler functions have been added to support Elasticsearch search highlighting and raw query execution. The \HighlightBuilderFn\ and \HighlightFieldBuilderFn\ now serialize highlight options into JSON, including support for the \max\_analyzed\_offset\ setting, allowing users to configure detailed text highlighting behavior in search requests. Additionally, \RawQueryBodyFn\ enables the use of raw JSON queries within the search DSL.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches · high confidence

Added suggestion builder handlers for Completion, Phrase, and Term suggestions

This change introduces new handler implementations in the \elastic4s-handlers\ module that serialize Completion, Phrase, and Term search suggestions into Elasticsearch JSON. The new \CompletionSuggestionBuilderFn\, \PhraseSuggestionBuilderFn\, and \TermSuggestionBuilderFn\ objects handle the construction of the specific JSON structures required by Elasticsearch, including support for completion contexts (category and geo), phrase suggestion features like direct generators and collation, and term suggestion parameters such as fuzzy matching and sorting. This provides the underlying logic for users to build and send these specific types of search suggestions.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/suggestion · high confidence

Added support for serializing script parameter objects using Spray JSON

Users can now pass complex objects as parameters to Elasticsearch scripts when using the Spray JSON module. The library provides an implicit \ParamSerializer\ that leverages Spray's \RootJsonWriter\ to convert case classes into JSON strings, allowing script parameters to be serialized automatically without manual formatting.

elastic4s-json-spray · high confidence

Akka HTTP client now supports disabling SSL certificate verification

The Akka HTTP client implementation has been updated to allow users to skip SSL certificate verification. This is controlled by the new \verify-ssl-certificate\ configuration option (defaulting to \true\) in \reference.conf\. When set to \false\, the client uses a custom SSL context that accepts any certificate, which is useful for environments with self-signed certificates. The change introduces new internal components (\Blacklist\, \HttpPoolFactory\, \DefaultHttpPoolFactory\) to manage the HTTP connection pool and SSL context creation.

elastic4s-client-akka/src/main · high confidence

Circe module adds ParamSerializer derivation

The elastic4s-json-circe module now provides an implicit ParamSerializer instance for Circe, allowing case classes to be automatically serialized for query parameters when circe.generic.auto is imported. This addition complements the existing automatic derivation for HitReader, AggReader, and Indexable, ensuring consistent codec support across all serialization needs within the library.

elastic4s-json-circe · high confidence

Comprehensive aggregation builder implementations for Elasticsearch

The library now provides complete JSON serialization builders for a wide range of Elasticsearch aggregations, enabling users to construct complex search queries. This update introduces builders for statistical aggregations (Avg, Max, Min, Sum, Stats, ExtendedStats, Cardinality, Percentiles), bucketing aggregations (DateHistogram, Histogram, Range, DateRange, GeoDistance, GeoHashGrid, GeoTileGrid, GeoBounds, GeoCentroid, Nested, ReverseNested, Children, Global, Sampler, Missing, MultiTerms, Composite, Filters, KeyedFilters, Filter, AdjacencyMatrix), and specialized aggregations (ScriptedMetric, SigTerms, SigText, IpRange). Each builder correctly maps Scala configuration objects to the Elasticsearch JSON DSL, supporting features like script fields, sub-aggregations, metadata, and specific options such as hard bounds for histograms or precision for geotile grids.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders · high confidence

Comprehensive field mapping handlers for Elasticsearch

The \elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields\ module now provides complete serialization and deserialization support for a wide range of Elasticsearch field types. This includes new handlers for specialized fields such as \AggregateMetricField\, \AnnotatedTextField\ (with analyzer support), \DenseVectorField\ (supporting HNSW, Flat, and various quantization types like Int8/Int4 and Bbq), \ExponentialHistogramField\, \IcuCollationKeywordField\, \MatchOnlyTextField\, \PatternTextField\, \RankVectorsField\, \SemanticTextField\, and \SparseVectorField\. The \ElasticFieldBuilderFn\ centralizes dispatching to these handlers, ensuring that complex field configurations—including multi-fields, nested properties, and specific index options—are correctly translated to and from JSON mappings.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields · high confidence

Comprehensive rewrite of search aggregation DSL and builders

The aggregation definitions in \elastic4s-core\ have been completely rewritten to use a modern, fluent Scala API. All aggregation types (such as \DateHistogramAggregation\, \HistogramAggregation\, \GeoTileGridAggregation\, and \CompositeAggregation\) are now defined as case classes with dedicated builder methods (e.g., \.field()\, \.script()\, \.subAggregations()\) and support for metadata. A new \AggregationBuilderFn\ centralizes the serialization logic, mapping these case classes to their corresponding JSON builders. This change introduces support for new aggregation features like \AdjacencyMatrixAggregation\, \AutoDateHistogramAggregation\, and \VariableWidthAggregation\, while also standardizing how sub-aggregations and metadata are handled across all aggregation types.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs · high confidence

Domain model refactoring and new field support

The elastic4s-domain module has been restructured to introduce a unified \ElasticField\ trait, replacing previous ad-hoc field definitions with a consistent hierarchy that includes new types such as \AggregateMetricField\, \ExponentialHistogramField\, and \IcuCollationKeywordField\. This change also adds support for modern Elasticsearch features like \AnnotatedTextField\ with analyzer configuration, \CompletionField\ with context support, and enhanced numeric fields with \timeSeriesDimension\ and \timeSeriesMetric\ options. Additionally, the module introduces core domain abstractions for search results (\Hit\, \HitReader\), error handling (\ErrorCause\, \BulkIndexByScrollFailure\), and analysis components (\CustomAnalyzer\, \CustomNormalizer\, various tokenizers), providing a more robust and type-safe foundation for building Elasticsearch queries and mappings. Also in this area: Support for timeout and completion parameters in task management; Enhanced task retrieval with wait/timeout options and richer response data.

elastic4s-domain · high confidence

Expanded search query support with new handlers and routing

This update significantly broadens the range of Elasticsearch queries supported by the elastic4s HTTP client. The central QueryBuilderFn has been updated to route a wide array of new query types, including DistanceFeature, FunctionScore, Intervals, KNN, MoreLikeThis, Pinned, RankFeature, ScriptScore, Semantic, and SparseVector queries, alongside a comprehensive suite of Span queries (Containing, FieldMasking, First, MultiTerm, Near, Not, Or, Term, Within). Additionally, handlers for Percolate, Script, and Noop queries have been added, ensuring that these specific search capabilities can now be constructed and serialized correctly.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries · high confidence

Implementation of Search Template API handlers and builders

This change introduces the core implementation for Elasticsearch search templates within the elastic4s client. It adds new files to construct JSON request bodies for putting, getting, removing, and executing search templates (PutSearchTemplateBuilderFn, TemplateSearchBuilderFn) and defines the HTTP handlers (SearchTemplateHandlers) that map these requests to the appropriate Elasticsearch endpoints (/\_scripts/ and /\_search/template). This enables users to programmatically manage and execute stored search templates.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/template · high confidence

Ingest pipeline API support with versioning and GeoIP processor

The ingest module now supports creating, retrieving, and deleting pipelines via the new \IngestHandlers\. The \GetPipelineResponse\ and \PutPipelineRequest\ include an optional \version\ field, allowing users to manage pipeline versioning. Additionally, a \GeoIPProcessor\ is provided to enrich documents with geographical data, and a \CustomProcessor\ allows for arbitrary processor definitions.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/ingest · high confidence

Initial project scaffolding and configuration

This change introduces the foundational configuration files for the elastic4s project, including \.editorconfig\ for consistent code formatting, \.scalafmt.conf\ to enforce Scala formatting rules, \.scala-steward.conf\ to manage automated dependency updates, and \.git-blame-ignore-revs\ to ignore formatting commits in git history. It also adds a \docker-compose.yml\ file to spin up an Elasticsearch 9.5.4 instance for testing, configures SBT build options in \.sbtopts\, sets the project version to 9.5.1-SNAPSHOT in \version.sbt\, updates \.gitignore\ to exclude IDE and build artifacts, and replaces the minimal \README.md\ with comprehensive documentation covering installation, usage, and compatibility matrices.

(repo-wide) · high confidence

Introduce Pekko-based HTTP client with host blacklisting and retry logic

This change adds a new HTTP client implementation for elastic4s built on Apache Pekko (replacing the previous Akka-based client). It introduces configurable host blacklisting to temporarily exclude failing nodes, automatic retry with delay when all hosts are blacklisted, and SSL verification settings. The client includes a reference configuration file for tuning queue size, blacklist durations, and Pekko HTTP settings, along with comprehensive tests for the blacklist behavior and client retry mechanisms.

elastic4s-client-pekko · high confidence

Introduce http4s-based HTTP client implementation

Added a new HTTP client implementation for elastic4s using the http4s library. This includes the Http4sClient class for managing connections and sending requests, along with supporting modules for encoding elastic4s entities into http4s formats and converting between elastic4s and http4s request/response types.

elastic4s-client-http4s/src/main · high confidence

Introduction of generic HttpClient trait and restructured DSL entry points

The core library now exposes a generic \HttpClient\[F\[\_\]\]\ trait, allowing users to plug in various HTTP libraries (such as Akka HTTP, STTP, or Apache Commons) instead of being tied to a specific implementation. To support this, the \ElasticDsl\ object has been restructured: \ElasticDsl\ now extends \ElasticDslWithoutSearch\ (which includes most handlers) plus \SearchHandlers\, while \ElasticDslWithoutSearch\ provides a subset of functionality for scenarios where search handlers are not needed. Additionally, \ElasticDsl\ now offers a \withCustomAggregationHandler\ method, enabling users to supply a custom handler for aggregations when constructing an \ElasticDslWithCustomAggregationHandler\ instance.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s · high confidence

New Pekko HTTP client and unified authentication support

The library introduces a new \elastic4s-client-pekko\ module providing a Pekko-based HTTP client (\PekkoHttpClient\) as an alternative to the existing Akka HTTP client, featuring identical host-blacklisting and retry logic. The core \ElasticClient\ now supports unified authentication via \CommonRequestOptions\, allowing users to configure Basic (username/password) and API Key credentials directly on requests, while the Java client module adds optional request body compression.

repository · high confidence

New cluster management and node inspection handlers

This change introduces a new set of handlers in the \elastic4s-handlers\ module for interacting with Elasticsearch cluster and node APIs. Users can now retrieve cluster state, health, and statistics, as well as get and update cluster settings (including persistent and transient configurations). Additionally, new capabilities allow inspecting node usage and hot threads, with support for specific parameters like node ID, timeout, and thread sampling options.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/cluster · high confidence

New handlers for geo search queries

Added body-serialization handlers for geo search queries (bounding box, distance, polygon, and shape) in the elastic4s-handlers module, enabling these queries to be correctly converted to Elasticsearch JSON bodies.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo · high confidence

New sniffing client implementation with resource management

Added a new \JavaClientSniffed\ module that wraps the Elasticsearch Java REST client with automatic node sniffing capabilities. Users can now configure sniffing intervals and failure-handling delays via \SniffingConfiguration\. The implementation ensures the underlying \Sniffer\ resource is properly closed after use to prevent leaks.

elastic4s-client-sniffed · high confidence

New sttp-based HTTP client implementation

The sttp client module now uses a new \SttpRequestHttpClient\ that leverages sttp 3 for making requests. This implementation supports custom headers, handles various entity types (string, byte array, file, and input stream) with proper resource management via \scala.util.Using\, and provides a convenient \apply\ method with reasonable defaults for implicit execution contexts and backends.

elastic4s-client-sttp/src/main · high confidence

New testkit utilities for integration testing

The elastic4s-testkit module now includes a suite of ScalaTest matchers and helper traits to simplify integration testing. Users can now use index matchers like \haveCount\, \haveDocument\, \containDoc\, \beCreated\, and \beEmpty\, as well as search matchers such as \containId\, \haveFieldValue\, \haveSourceField\, \haveSourceFieldValue\, \haveTotalHits\, \haveHits\, and \haveNoHits\. Additionally, the \ElasticSugar\ trait provides blocking helpers like \blockUntilGreen\, \blockUntilDocumentExists\, and \blockUntilCount\ to handle asynchronous index operations, while \DockerTests\ offers a base trait for managing Docker-based Elasticsearch instances with automatic client shutdown hooks.

elastic4s-testkit · high confidence

New text search query handlers and expanded parameter support

The library now supports the \combined\_fields\ query type and adds the \autoGenerateSynonymsPhraseQuery\ parameter to \MatchQuery\, \MultiMatchQuery\, \QueryStringQuery\, and \SimpleStringQuery\. Additionally, \MatchPhraseQuery\ and \MatchPhrasePrefixQuery\ now support the \zeroTermsQuery\ parameter, and \QueryStringQuery\ exposes \maxDeterminizedStates\ and \quoteAnalyzer\. These changes are implemented via new body-building handlers in the text queries module, enabling more precise control over text search behavior.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/text · high confidence

Support for Elasticsearch Synonyms API

Added handlers for the Elasticsearch Synonyms API, enabling users to manage synonym sets and individual synonym rules. This includes creating or updating synonym sets and rules, retrieving specific sets or rules, listing available sets, and deleting sets or rules via the \/\_synonyms\ endpoint.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/synonyms · high confidence

Support for Stored Script APIs

Users can now manage stored scripts in Elasticsearch. This change introduces handlers for the PUT, GET, and DELETE operations on stored scripts (endpoints like /\_scripts/{id}) and adds a builder function to serialize script requests, including support for source vs. stored script types, parameters, and options.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/script · high confidence

Support for the Terms Enum API

Users can now execute the Elasticsearch Terms Enum API to retrieve unique term values for a specific field. This change adds the handler implementation in \elastic4s-handlers\, which constructs the necessary POST request to the \/\_terms\_enum\ endpoint and serializes request parameters such as field name, string prefix, size, timeout, case-insensitivity, index filters, and search-after values into the JSON body.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/termsenum · high confidence

Task API handlers support parent task filtering and cancellation

The task handler module now implements request builders for the Elasticsearch Tasks API, including support for filtering task lists by a parent task ID via the \parent\_task\_id\ query parameter. It also provides handlers for listing tasks, retrieving specific task details, and cancelling tasks either by ID or by node/action filters, ensuring responses correctly interpret cancellation status even when node failures are present.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/task · high confidence

Architecture

Count request handler moved to dedicated handlers module

The implementation for the Count API request handler has been relocated into the \elastic4s-handlers\ module. This change introduces \CountBodyBuilderFn\ to construct the JSON body and \CountHandlers\ to manage the HTTP request building, including URL encoding for indices and query parameters like \allow\_no\_indices\ and \stats\. This reorganization centralizes handler logic within the new module structure.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/count · high confidence

Migrated index request handlers and content builders to a dedicated module

Index-related request handlers and content builders have been moved into the \elastic4s-handlers\ module under the \handlers.index\ package. This refactoring consolidates the implementation for index operations—including creating indices, managing templates, performing analysis, handling rollovers, and updating index settings—into a single, organized location, separating the handler logic from the core request definitions.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index · high confidence

Reorganized API into modular traits

The client API has been refactored from a single monolithic trait into a collection of focused, modular traits (such as AggregationApi, QueryApi, and SnapshotApi). This change improves code organization and maintainability, allowing users to mix in only the specific API components they need rather than importing the entire client interface.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/api · high confidence

Security handlers for roles and users moved to elastic4s-handlers

The implementation for Elasticsearch security operations has been reorganized: role and user handlers (including create, update, delete, get, enable, disable, and password change) along with their JSON content builders have been moved into the elastic4s-handlers module. This change consolidates the HTTP request building and response handling logic for these security features in one place, while the request/response data models remain in their respective request modules.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security · high confidence

Behavioural changes

Consolidated delete handlers with task support and slicing

The delete handlers have been consolidated into a single module, introducing support for asynchronous Delete By Query operations via task responses and enabling automatic slicing for parallelized deletions. The Delete By Query handler now parses task IDs from responses to return task references when asynchronous execution is requested, and it supports configuring slice-based parallelism in the request body. Additionally, the handler respects the ignore\_unavailable parameter and shard preference settings, while the Delete By Id handler continues to handle standard document deletion with versioning and routing support.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete · high confidence

Enhanced KNN search with inner\_hits and rescore vector support

The KNN search handler now supports additional configuration options for more precise vector search results. Users can now specify inner\_hits to retrieve nested document details within KNN results, and utilize the rescore\_vector parameter with oversampling to improve search accuracy. The builder also continues to support query\_vector\_builder for text embedding models, standard query vectors, filtering, similarity metrics, boosting, and query naming.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/knn · high confidence

Enhanced json4s integration with parameter serialization and ID fallback

The elastic4s-json-json4s module now provides an implicit ParamSerializer for json4s, allowing json4-serializable objects to be used directly in script parameters. Additionally, the Json4sHitReader has been updated to populate the document ID in the deserialized object from hit metadata when the ID is not present in the source JSON, ensuring consistent ID handling during deserialization.

elastic4s-json-json4s · high confidence

Explicit Functor instances for Monix and Scalaz Task types

The \elastic4s-effect-monix\ and \elastic4s-effect-scalaz\ modules now explicitly provide \cats.Functor\ instances for their respective \Task\ types (\monix.eval.Task\ and \scalaz.concurrent.Task\). This ensures that these effect types are properly recognized by the Cats type class hierarchy, allowing for consistent functional programming patterns when using these effect systems with elastic4s.

elastic4s-effect-monix, elastic4s-effect-scalaz · high confidence

Handlers for node info/stats and search collapse moved to handlers module

The implementation code for node information and statistics requests (NodeInfoHandler, NodeStatsHandler) and the search collapse builder (CollapseBuilderFn) has been relocated into the elastic4s-handlers module. This change organizes the codebase by moving these specific handler implementations to a dedicated location, ensuring that the logic for building Elasticsearch API requests for node stats and search collapsing is now contained within the handlers package structure.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/nodes, elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/collapse · high confidence

Handlers for term-based search queries now support case-insensitive matching and expanded type options

The query body handlers in the term query package have been updated to support new Elasticsearch features and type flexibility. Term, prefix, regex, and wildcard queries now support a case-insensitive flag, allowing users to perform case-insensitive matching without modifying their data. Range queries have been extended to accept Int values in addition to Long, Double, String, and ElasticDate, providing more convenient type handling for integer ranges. Additionally, the handlers for these queries correctly serialize boost, query name, and other standard parameters.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term · high confidence

Implementation of Get and MultiGet request handlers

This change introduces the handler implementations for the Get and MultiGet API endpoints within the elastic4s-handlers module. The new GetHandler constructs requests to specific document endpoints, properly encoding index names and IDs, and handles response parsing for success, missing documents (404), and errors. The MultiGetHandler manages bulk retrieval requests, building the necessary JSON body structure and handling HTTP responses, including specific error cases like 401 Unauthorized. These handlers replace previous logic, ensuring consistent URL encoding and response handling for document retrieval operations.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/get · high confidence

Migrated index alias and exists request handlers to separate modules

The implementation for index alias operations (adding, removing, and getting aliases) and document existence checks has been moved into dedicated handler modules (\IndexAliasHandlers\ and \ExistsHandlers\). This change introduces new builder and handler classes that construct the specific HTTP requests (POST to \/\_aliases\ for alias actions, HEAD for exists checks) and parse the corresponding responses, effectively decoupling these specific request types from the broader handler structure.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/alias · high confidence

Migration to Jackson 3 for JSON handling

The library has switched its underlying JSON serialization library from Jackson 2 to Jackson 3. This change updates the internal \JacksonSupport\ component to use the \tools.jackson\ package namespace and the new Jackson 3 builder APIs, ensuring compatibility with the updated dependency. Users interacting with the library will benefit from the new Jackson version's features and fixes, though this is an internal implementation detail that should not require changes to application code unless direct Jackson usage was present.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers · high confidence

Moved compound query handlers to dedicated module

The handlers for compound search queries (Bool, Boosting, ConstantScore, and DisMax) have been moved into the new \elastic4s-handlers\ module. This refactoring organizes the query serialization logic into specific builder functions within the \handlers/searches/queries/compound\ package, ensuring that the JSON bodies for these queries are generated correctly without unnecessary empty arrays or fields.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/compound · medium confidence

New sort handlers added to the handlers module

The sort query builders (Field, GeoDistance, Nested, Score, and Script) have been moved into the new \elastic4s-handlers\ module. This change reorganizes the codebase structure but does not alter the functionality of search sorting for users.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/sort · high confidence

ReactiveElastic API now requires CommonRequestOptions

The \ReactiveElastic\ extension methods for creating \BulkIndexingSubscriber\ and \ScrollPublisher\ instances now explicitly require an implicit \CommonRequestOptions\ parameter. This change ensures that configuration options (such as timeouts, retries, or headers) are consistently propagated from the client context to the reactive stream components, rather than relying on defaults or separate configuration mechanisms.

elastic4s-reactivestreams-pekko/src/main · high confidence

ReactiveElastic extension methods now require CommonRequestOptions

The \ReactiveElastic\ implicit class in the \elastic4s-reactivestreams-akka\ module has been updated so that its \subscriber\ and \publisher\ methods now explicitly require an implicit \CommonRequestOptions\ parameter. This change ensures that configuration options (such as timeouts, retries, or authentication details) defined in \CommonRequestOptions\ are consistently passed through to the underlying Akka Streams components (\BulkIndexingSubscriber\, \ScrollPublisher\), rather than relying on potentially missing or default client settings.

elastic4s-reactivestreams-akka/src/main · high confidence

Refactored bulk request builder to use iterators for improved memory efficiency

The bulk request handling logic has been refactored to reduce memory retention during the construction of HTTP bodies. The \BulkBuilderFn\ now returns an \Iterator\[String\]\ instead of retaining a set, allowing the \BulkHandler\ to stream the NDJSON content more efficiently. This change impacts how bulk operations (index, delete, update) are serialized and sent to Elasticsearch, potentially lowering memory usage for large bulk requests.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/bulk · high confidence

Refactored index mapping handlers and builders

The index mapping request handlers and JSON builders have been reorganized into dedicated components within the mapping package. This includes new functions for building dynamic template bodies, converting index mappers to fields, and constructing mapping definitions, alongside updated handlers for getting and putting mappings. This change improves the structure of how mapping requests are serialized and processed.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/mapping · high confidence

Refactored request handling and JSON serialization infrastructure

The request handling layer has been restructured to use a new generic JSON abstraction and a dedicated \BodyBuilder\ typeclass for constructing request bodies, replacing previous inline serialization logic. The \ElasticRequest\ model now explicitly supports custom headers, and the \ResponseHandler\ infrastructure has been updated to use Jackson 3 for deserializing responses. Additionally, URL encoding for spaces has been corrected to use \%20\ instead of \+\, and various handler implementations (such as Cat, Explain, Locks, TermVectors, and Validate) have been migrated to use the new \Handler\ typeclass and \ElasticRequest\ structure.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s · high confidence

Reindex API handler supports advanced request parameters and response fields

The reindex handler now constructs requests with support for conflicts handling (proceed/abort), max\_docs, source slicing (id/max), remote reindexing (host, username, password), version type, create-only mode, and pipeline configuration. The response model has been expanded to include a failures field for capturing bulk index-by-scroll errors, along with throttling metrics (throttled\_millis, requests\_per\_second, throttled\_until\_millis).

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/reindex · high confidence

Search request handling and serialization refactored into dedicated builder and handler components

The search request logic in the core module has been reorganized into specific builder and handler files to improve modularity and support new search capabilities. SearchBodyBuilderFn now constructs the JSON body for search requests, explicitly supporting runtime mappings (including date formats and composite fields), multiple KNN fields, PIT (Point-in-Time) API usage, and custom aggregations. MultiSearchBuilderFn handles the NDJSON formatting for multi-search requests, including header options like preference and request cache. SearchHandlers manages the HTTP request construction for both single and multi-search endpoints, while SearchScrollHandlers and SearchIterator provide robust scroll context management, including automatic clearing of the scroll context upon exhaustion to free server resources. Additionally, deprecated search template APIs are retained but marked for removal in favor of the stored scripts API.

elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches · high confidence

Update by query now supports asynchronous execution, automatic slicing, and failure reporting

The update handler module has been refactored to support asynchronous update-by-query operations, allowing users to initiate long-running updates without blocking. The implementation adds support for automatic slicing to parallelize update tasks, configurable routing, and shard preference. Additionally, the response model now includes a failures field to report bulk index by scroll errors, and the handler correctly processes doc\_as\_upsert and scripted\_upsert flags.

elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/update · high confidence

Test coverage

2 commits adding/updating tests in elastic4s-streams-akka, elastic4s-streams-pekko; Added analysis example tests; Added commented-out test scaffolding for Index and Search matchers; Added integration and DSL tests for admin and validation operations; Added integration tests for Elasticsearch alias operations; Added integration tests for KNN search capabilities; Added integration tests for cluster management APIs; Added integration tests for completion, phrase, and term suggestions; Added integration tests for index and cat API requests; Added integration tests for search aggregations; Added integration tests for search query DSL components; Added integration tests for snapshot repository and snapshot lifecycle operations; Added test coverage for analysis token filters; Added test coverage for client configuration, search, and cluster management; Added test coverage for core client, error handling, and request builders; Added test coverage for script-based search sorting; Added test for Jackson double serialization format; Added test for ZIO Task Functor; Added test for authentication header propagation in SttpRequestHttpClient; Added test for reload search analyzers request; Added tests for Cat API endpoints; Added tests for Elastic field mapping serialization and integration; Added tests for ElasticClient authentication and UTF-8 support; Added tests for Get and MultiGet request handling; Added tests for Index Lifecycle Management status and control; Added tests for Jackson-based JSON serialization in Elasticsearch operations; Added tests for Node Hot Threads and Node Usage APIs; Added tests for Point-in-Time API; Added tests for Reindex API parameters; Added tests for ScrollPublisher and BulkIndexingSubscriber; Added tests for Update and UpdateByQuery requests; Added tests for XContentBuilder serialization of numeric and iterable types; Added tests for bulk request operations; Added tests for delete API functionality; Added tests for index settings retrieval and updates; Added tests for mapping DSL and API definitions; Added tests for reactive streams components; Added tests for search DSL, inner hits, multi-search, and scrolling; Added tests for search field collapsing via HTTP client; Added tests for search highlight functionality; Added tests for security roles and users APIs; Added tests for stored script and script field functionality; Added tests for the Terms Enum API; Added tests for the http4s client integration; Added tests for the server info request; Added tests for the synonyms API; Added unit and integration tests for the Akka HTTP client; Added unit tests for analyzer and token filter builders; Added unit tests for analyzer and tokenizer builders.

Dependencies

Build infrastructure overhaul and dependency updates

The project build has been significantly restructured, migrating to SBT 1.x with a new multi-module layout supporting Scala 2.13.18 and Scala 3.3.8, while dropping Scala 2.11 and 2.12 support. Key dependency updates include upgrading the Elasticsearch REST client to version 7.12.1, Jackson to 2.10.4, and Log4j to 2.26.1. The build also introduces Pekko support (renaming Akka HTTP streams modules), adds new client modules for ZIO HTTP and sttp4, and configures publishing via the Central Portal. Sample projects for Maven, Gradle, and SBT have been added to demonstrate integration.

(dependencies) · high confidence

Build infrastructure overhaul with SBT 2.0 and centralized dependency management

The project's build system has been significantly restructured: SBT has been upgraded to version 2.0.9, and build configuration is now centralized in a new \project/Dependencies.scala\ file that defines versions for all libraries (including Elasticsearch 9.5.4, Jackson 3.2.3, and ZIO 2.1.26). The build also introduces specific JVM memory settings via \.sbtopts\ and updates release and formatting plugins (\sbt-ci-release\ 1.12.1, \sbt-scalafmt\ 2.6.2).

project · high confidence

Jackson integration upgraded to Jackson 3

The Jackson JSON module has been migrated from Jackson 2 to Jackson 3, updating the underlying library imports (e.g., from com.fasterxml.jackson to tools.jackson) and reconfiguring the ObjectMapper with the same serialization and deserialization settings (such as handling of Scala types, null values, and single-value arrays). This change ensures compatibility with the newer Jackson version while maintaining existing JSON handling behavior for users of the elastic4s-json-jackson module.

elastic4s-json-jackson/src/main · high confidence

Migrate JSON builder to Jackson 3

The JSON builder implementation in elastic4s-json-builder has been updated to use Jackson 3 (tools.jackson.databind) instead of the previous Jackson 2 version. This change affects how JSON nodes are created and serialized internally, ensuring compatibility with the newer Jackson library version while maintaining the same public API for building JSON content.

elastic4s-json-builder/src/main/scala/com/sksamuel/elastic4s/json · high confidence

Migrate JSON serialization to Jackson 3

The JSON builder module now uses Jackson 3 (tools.jackson) instead of Jackson 2 for serializing and deserializing data. This change updates the underlying ObjectMapper configuration to support Jackson 3 features while maintaining existing behaviors such as allowing unquoted property names, single quotes, and treating single values as arrays.

elastic4s-json-builder/src/main/scala/com/sksamuel/elastic4s · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 60 → 60 (-0.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 61 → 60 (-1.7)
  • Architecture 88 → 96 (+7.5)
  • Maturity 59 → 58 (-0.1)
  • Readiness 52 → 51 (-0.9)
  • Security 89 → 85 (-4.3)
  • Performance 100 → 100 (+0.0)

Resolved (5)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Duplicated block (5 lines × 4) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/RangeQueryBodyFn.scala)
  • Duplicated block (61 lines × 2) (elastic4s-streams-akka/src/main/scala/com/sksamuel/elastic4s/akka/streams/ElasticSource.scala)
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion

New (91)

  • Critical CVE: [GHSA redacted] (samples/elastic4s-http-client-maven/pom.xml)
  • Edited copies of one member (3 members, 10+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/ScriptQueryBodyFn.scala)
  • Edited copies of one member (3 members, 10+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/term/PrefixQueryBodyFn.scala)
  • Edited copies of one member (3 members, 17+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala)
  • Edited copies of one member (3 members, 17+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala)
  • Edited copies of one member (3 members, 19+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/GaussianDecayScoreBuilderFn.scala)
  • Edited copies of one member (3 members, 6+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala)
  • Edited copies of one member (3 members, 6+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/security/roles/RoleAdminHandlers.scala)
  • Edited copies of one member (3 members, 8+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala)
  • Edited copies of one member (3 members, 9+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/cluster/NodeUsageHandler.scala)
  • Edited copies of one member (4 members, 11+ corresponding lines) (elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/SearchMatchers.scala)
  • Edited copies of one member (4 members, 15+ corresponding lines) (elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/GeoBoundsAggregationBuilder.scala)
  • Edited copies of one member (4 members, 22+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/fields/CompletionFieldBuilderFn.scala)
  • Edited copies of one member (4 members, 9+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/span/SpanContainingQueryBodyFn.scala)
  • Edited copies of one member (5 members, 10+ corresponding lines) (elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/aggresponses.scala)
  • Edited copies of one member (5 members, 12+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/searches/queries/geo/GeoPolyonQueryBodyFn.scala)
  • Edited copies of one member (5 members, 6+ corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/index/IndexAdminHandlers.scala)
  • Edited copy of a member (10 corresponding lines) (elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/AggregationBuilderFn.scala)
  • Edited copy of a member (10 corresponding lines) (elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/CardinalityAggregationBuilder.scala)
  • Edited copy of a member (10 corresponding lines) (elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/delete/DeleteHandlers.scala)
  • …and 71 more

Changes since last survey

  • 10 commits — 9 feature/other, 1 fixes

By area

  • (root) — 4 commits
  • elastic4s-core/src — 2 commits
  • project/Dependencies.scala — 2 commits
  • .github/workflows — 1 commit
  • project/build.properties — 1 commit

Notable commits

  • fix: Fix source filtering in multiget requests (#4210)
  • change: Fix typos in documentation (#4189)
  • change: Release version 9.5.1
  • change: Set version to next snapshot
  • change: Update elasticsearch-rest-client, ... to 9.5.6 (#4196)
  • change: Update jackson-core to 3.3.0 (#4204)
  • change: Update sbt to 2.0.12 (#4191)
  • change: Update scala3-library to 3.3.9 (#4190)
  • change: Update typesafe:config to 1.4.10 (#4200)
  • change: Write _source filtering of bulk update actions as a source filter object (#4208)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Philippus/elastic4s was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6f3707a3dbbc2acfb5ef544f3e72f6686675a8f4 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.