FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

Elasticsearch for the Coldbox Framework

v2.1.2+343 Public

Elasticsearch for the Coldbox Platform


Apache License, Version 2.0.


Via CommandBox: install cbelasticsearch


The elasticsearch module for the Coldbox Platform provides you with a fluent search interface for Elasticsearch, in addition to a CacheBox Cache provider and a Logbox Appender. Both the cache provider and logbox appender rely on Wirebox DSL mappings to the Elasticsearch client. As such additional Wirebox configuration is necessary to use them outside of the Coldbox context.


  • Coldbox >= v4.5
  • Elasticsearch >= v5.0
  • Lucee >= v4.5 or Adobe Coldfusion >= v11

Note: Most of the REST-based methods will work on Elasticsearch versions older than v5.0. A notable exception is the multi-delete methods, which use the delete by query functionality of ES5. As such, Cachebox and Logbox functionality would be limited.


Read the full documentation for the module and its capabilites at ([]

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | |


Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.

"...but we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope: And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the Holy Ghost which is given unto us. ." Romans 5:5


"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12

Dependencies (1)

Dev Dependencies (0)



  • Issue #76 - Fixes an incorrect error response typing


  • Additional documentation updates
  • Improve error response by passing all response errors through a single parsing method
  • Add handling for root cause exceptions on shard failure ( Issue #65 )
  • Issue #72 - Fixes a bug where the node pool was not using the full length of the pool
  • Issue #74 - Fixes a regression in filterTerms query DSL generation


  • Modifies LogstashAppender schema to match default 7.x logstash template and adds additional schema keys and hooks for Stachebox
  • Adds the collapseToFields method to the search builder to support documents grouped on a specific field.


  • Adds the ability to specify an operator to term queries via filterTerm and filterTerms and pass multiple values to filter


  • Lowers the default number of Logstash shards on index to 2, to prevent inheritance of application shard settings
  • Lowers the default number of Logstash replicas to 0, to prevent maximum shard errors
  • Changes the default Logstahs index rotation frequency to weekly


  • Fixes an error in the Logstash appender which could be thrown by a non-string value in the exception object type key


  • Adds additional data and exception information in Logstash appender messages


  • Adds Logstash appender and converts Elasticsearch appender to use Logstash schema for index data
  • Adds a wildcard method to Search builder for wildcard searches on keyword-mapped fields


  • Converts default native client to HyperClient ( native CFML implementation )
  • Removes the deleteMapping method in the main client, as it is no longer supported in ES versions 6.5 and up.
  • Removes support for Adobe Coldfusion 11
  • Removes support for Lucee 4.x
  • Moves previous native JEST Client to cbelasticsearch-jest module.
  • Ends official support for 6.x versions of Elasticsearch
  • Adds cbElasticsearchPreSave and cbElasticsearchPostSave interceptions when saving individual or bulk documents
  • Adds the ability to create, update, read, and delete Elasticsearch pipelines
  • Adds the ability to configure a pipeline for document processing ( e.g. myDocument.setPipeline( 'my-pipeline' ) )
  • Adds the ability to add save query parameters when saving individual documents ( e.g. myDocument.addParam( 'refresh', true ) )
  • Adds the ability to pass a struct of params to bulk save operations (e.g. client.saveAll( documents, false, { "refresh" : true } ) )


  • Fixes an issue where a null value would throw an error when creating a native Java HashMap


  • Adds new search builder methods suggestTerm, suggestPhrase, and suggestCompletion for auto-completion and auto-suggestion queries
  • Adds a throw on error argument, with a default of true, to client reindex() method when waiting for completion
  • Fixes an issue where default shard/replica settings were being overwritten when passing a complete config


  • Modifies search builder methods of filterTerm and filterTerms to return the builder instance ( Issue #43 )
  • Adds a Util component for common inbound and outbound conversions and casting
  • Modifies Document setValue method to return instance, for method chaining ( Issue #40 )
  • Fixes an error when individual documents in a bulk save contained errors ( Issue #44 )


  • Adds responses to task model
  • Adds the ability to provide a transformation script to the client reindex method


  • Adds the ability to pass URL parameters to SearchBuilder-aware client methods. Adds a param( name, value ) supporting method to the SearchBuilder
  • Adds a new Task object which can be refreshed and used in a loop as long-running tasks complete in the background ( e.g. while( !task.isComplete() ) )
  • ( Breaking ) Changes the return type of the deleteByQuery and updateByQuery to return the full API response which may be inspected or used to follow-up on tasks
  • implements a getAllTasks() method in the client, which will return an array of Task objects
  • implements a getTask method in the client to retreive tasks by identifier ( e.g. - [node]:[id] ).
  • implements a getIndices method in the client to retreive a map of indices with stats
  • implements a getAliases method in the client to retreive a map of aliases
  • Resolves Issue #12 - slf4j missing on non-Runwar installations
  • Resolves Issue #17 - implements workarounds and adds documentation on how to configure and use a connection to a secondary elasticsearch cluster


  • Adds fallback attempt when connection pool is unexpectedly closed upstream


  • Adds a soft fail to the version target check when a connection to the ES start page cannot be established


  • Implements compatibility for Elasticsearch v7
  • Adds environment variable detection for default configuration
  • Implements a new AliasBuilder object, which can be used to alias indexes
  • Implements a new reindex() method in the client which allows the ability to reindex
  • Implements new mustExist and mustNotExist methods to the SearchBuilder


  • Reverts to previous versions of HTTP client due to instability and connection expiration issues
  • Adds connection cleanup prior to execution


  • Updates Apache HTTP Client to v4.5.9
  • Adds count() methods to the SearchBuilder and Client


  • Implements url encoding for identifiers, to allow for spaces and special characters in identifiers


  • Implements update by query API and interface


  • Adds compatibility when Secure JSON prefix setting is enabled


  • Updates Java Dependencies, including JEST client, to latest versions
  • Implements search term highlighting capabilities


  • Updates to term and filterTerms SearchBuilder methods to allow for more precise filtering
  • Adds filterTerm method which allows restriction of the search context
  • Adds type and minimum_should_match parameters to multiMatch method in SearchBuilder


  • Adds support for Elasticsearch v6.0+
  • Adds a new MappingBuilder
  • Updates to SearchBuilder to alow for more complex queries with fewer syntax errors
  • Refactor filterTerms to allow other should or filter clauses
  • Add ability to specify _source excludes and includes in a query
  • ACF Compatibility Updates


  • Adds readTimeout and connectionTimeout settings
  • Adds defaultCredentials setting
  • Adds default preflight of query to fix common assembly syntax issues


  • Adds filterTerms() method to allow an array of term restrictions to the result set


  • Fixes pagination and offset handling
  • Adds support for terms filters in match()


  • Initial Release


$ box install cbelasticsearch

No collaborators yet.
  • {{ getFullDate("Dec 17 2020 02:12 PM GMT") }}
  • {{ getFullDate("Dec 17 2020 02:12 PM GMT") }}
  • 5,522
  • 10,240
  • 8,770