-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,465 additions
and
883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,16 @@ jobs: | |
ELASTICSEARCH_PROTOCOL: http | ||
ELASTICSEARCH_HOST: 127.0.0.1 | ||
ELASTICSEARCH_PORT: 9200 | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] | ||
ELASTICSEARCH_VERSION: [ "7.17.8", "8.5.3" ] | ||
ELASTICSEARCH_VERSION: [ "7.17.8", "8.7.0" ] | ||
experimental: [ false ] | ||
include: | ||
- cfengine: "adobe@2023" | ||
ELASTICSEARCH_VERSION: "8.7.0" | ||
experimental: true | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,102 @@ | ||
/** | ||
********************************************************************************* | ||
* Your Copyright | ||
******************************************************************************** | ||
*/ | ||
component{ | ||
********************************************************************************* | ||
* Your Copyright | ||
******************************************************************************** | ||
*/ | ||
component { | ||
|
||
// Module Properties | ||
this.title = "cbElasticSearch"; | ||
this.author = "Jon Clausen <[email protected]>"; | ||
this.webURL = ""; | ||
this.description = "Coldbox Module with Fluent API for ElasticSearch"; | ||
this.version = "@build.version@[email protected]@"; | ||
// If true, looks for views in the parent first, if not found, then in the module. Else vice-versa | ||
this.viewParentLookup = true; | ||
// If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa | ||
this.layoutParentLookup = true; | ||
// Module Entry Point | ||
this.entryPoint = "cbElasticsearch"; | ||
// Model Namespace | ||
this.modelNamespace = "cbElasticsearch"; | ||
// CF Mapping | ||
this.cfmapping = "cbElasticsearch"; | ||
// Auto-map models | ||
this.autoMapModels = true; | ||
// Module Dependencies That Must Be Loaded First, use internal names or aliases | ||
this.dependencies = [ "hyper" ]; | ||
// Auto-parse parent settings | ||
this.parseParentSettings = true; | ||
// Module Properties | ||
this.title = "cbElasticSearch"; | ||
this.author = "Jon Clausen <[email protected]>"; | ||
this.webURL = ""; | ||
this.description = "Coldbox Module with Fluent API for ElasticSearch"; | ||
this.version = "@build.version@[email protected]@"; | ||
// If true, looks for views in the parent first, if not found, then in the module. Else vice-versa | ||
this.viewParentLookup = true; | ||
// If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa | ||
this.layoutParentLookup = true; | ||
// Module Entry Point | ||
this.entryPoint = "cbElasticsearch"; | ||
// Model Namespace | ||
this.modelNamespace = "cbElasticsearch"; | ||
// CF Mapping | ||
this.cfmapping = "cbElasticsearch"; | ||
// Auto-map models | ||
this.autoMapModels = true; | ||
// Module Dependencies That Must Be Loaded First, use internal names or aliases | ||
this.dependencies = [ "hyper" ]; | ||
// Auto-parse parent settings | ||
this.parseParentSettings = true; | ||
|
||
variables.configStruct = {}; | ||
variables.configStruct = {}; | ||
|
||
|
||
function configure(){ | ||
function configure(){ | ||
// Default settings | ||
settings = { | ||
// The default hosts - an array of host connections | ||
// - REST-based clients (e.g. JEST): round robin connections will be used | ||
// - Socket-based clients (e.g. Transport): cluster-aware routing used | ||
versionTarget : getSystemSetting( "ELASTICSEARCH_VERSION", "" ), | ||
hosts : [ | ||
// The default connection is made to http://127.0.0.1:9200 | ||
{ | ||
serverProtocol : getSystemSetting( "ELASTICSEARCH_PROTOCOL", "http" ), | ||
serverName : getSystemSetting( "ELASTICSEARCH_HOST", "127.0.0.1" ), | ||
serverPort : getSystemSetting( "ELASTICSEARCH_PORT", 9200 ) | ||
} | ||
], | ||
// The default credentials for access, if any - may also be overridden when searching index collections | ||
defaultCredentials : { | ||
"username" : getSystemSetting( "ELASTICSEARCH_USERNAME", "" ), | ||
"password" : getSystemSetting( "ELASTICSEARCH_PASSWORD", "" ) | ||
}, | ||
// The default index | ||
defaultIndex : getSystemSetting( "ELASTICSEARCH_INDEX", "cbElasticsearch" ), | ||
// The default number of shards to use when creating an index | ||
defaultIndexShards : getSystemSetting( "ELASTICSEARCH_SHARDS", 5 ), | ||
// The default number of index replicas to create | ||
defaultIndexReplicas : getSystemSetting( "ELASTICSEARCH_REPLICAS", 0 ), | ||
// Whether to use separate threads for client transactions | ||
multiThreaded : true, | ||
// The maximum amount of time to wait until releasing a connection (in seconds) | ||
maxConnectionIdleTime : 30, | ||
// The maximum number of connections allowed per route ( e.g. search URI endpoint ) | ||
maxConnectionsPerRoute : 10, | ||
// The maxium number of connections, in total for all Elasticsearch requests | ||
maxConnections : getSystemSetting( "ELASTICSEARCH_MAX_CONNECTIONS", 100 ), | ||
// Read timeout - the read timeout in milliseconds | ||
readTimeout : getSystemSetting( "ELASTICSEARCH_READ_TIMEOUT", 3000 ), | ||
// Connection timeout - timeout attempts to connect to elasticsearch after this timeout | ||
connectionTimeout : getSystemSetting( "ELASTICSEARCH_CONNECT_TIMEOUT", 3000 ) | ||
}; | ||
|
||
// Default settings | ||
settings = { | ||
// The default hosts - an array of host connections | ||
// - REST-based clients (e.g. JEST): round robin connections will be used | ||
// - Socket-based clients (e.g. Transport): cluster-aware routing used | ||
versionTarget = getSystemSetting( "ELASTICSEARCH_VERSION", '' ), | ||
hosts = [ | ||
//The default connection is made to http://127.0.0.1:9200 | ||
{ | ||
serverProtocol: getSystemSetting( "ELASTICSEARCH_PROTOCOL", "http" ), | ||
serverName: getSystemSetting( "ELASTICSEARCH_HOST", "127.0.0.1" ), | ||
serverPort: getSystemSetting( "ELASTICSEARCH_PORT", 9200 ) | ||
} | ||
], | ||
// The default credentials for access, if any - may also be overridden when searching index collections | ||
defaultCredentials = { | ||
"username" : getSystemSetting( "ELASTICSEARCH_USERNAME", "" ), | ||
"password" : getSystemSetting( "ELASTICSEARCH_PASSWORD", "" ) | ||
}, | ||
// The default index | ||
defaultIndex = getSystemSetting( "ELASTICSEARCH_INDEX", "cbElasticsearch" ), | ||
// The default number of shards to use when creating an index | ||
defaultIndexShards = getSystemSetting( "ELASTICSEARCH_SHARDS", 5 ), | ||
// The default number of index replicas to create | ||
defaultIndexReplicas = getSystemSetting( "ELASTICSEARCH_REPLICAS", 0 ), | ||
// Whether to use separate threads for client transactions | ||
multiThreaded = true, | ||
// The maximum amount of time to wait until releasing a connection (in seconds) | ||
maxConnectionIdleTime = 30, | ||
// The maximum number of connections allowed per route ( e.g. search URI endpoint ) | ||
maxConnectionsPerRoute = 10, | ||
// The maxium number of connections, in total for all Elasticsearch requests | ||
maxConnections = getSystemSetting( "ELASTICSEARCH_MAX_CONNECTIONS", 100 ), | ||
// Read timeout - the read timeout in milliseconds | ||
readTimeout = getSystemSetting( "ELASTICSEARCH_READ_TIMEOUT", 3000 ), | ||
// Connection timeout - timeout attempts to connect to elasticsearch after this timeout | ||
connectionTimeout = getSystemSetting( "ELASTICSEARCH_CONNECT_TIMEOUT", 3000 ) | ||
}; | ||
|
||
// Custom Declared Points | ||
interceptorSettings = { | ||
customInterceptionPoints = [ | ||
// Custom Declared Points | ||
interceptorSettings = { | ||
customInterceptionPoints : [ | ||
"cbElasticsearchPreSave", | ||
"cbElasticsearchPostSave" | ||
] | ||
}; | ||
|
||
// Custom Declared Interceptors | ||
interceptors = []; | ||
|
||
} | ||
}; | ||
|
||
/** | ||
* Fired when the module is registered and activated. | ||
*/ | ||
function onLoad(){ | ||
/** | ||
* Main Configuration Object Singleton | ||
**/ | ||
binder.map( "Config@cbElasticsearch" ) | ||
.to( '#this.cfmapping#.models.Config' ) | ||
.threadSafe() | ||
.asSingleton(); | ||
// Custom Declared Interceptors | ||
interceptors = []; | ||
} | ||
|
||
binder.map( "Client@cbElasticsearch" ) | ||
.to( '#this.cfmapping#.models.io.HyperClient' ); | ||
/** | ||
* Fired when the module is registered and activated. | ||
*/ | ||
function onLoad(){ | ||
/** | ||
* Main Configuration Object Singleton | ||
**/ | ||
binder | ||
.map( "Config@cbElasticsearch" ) | ||
.to( "#this.cfmapping#.models.Config" ) | ||
.threadSafe() | ||
.asSingleton(); | ||
|
||
} | ||
binder.map( "Client@cbElasticsearch" ).to( "#this.cfmapping#.models.io.HyperClient" ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name":"Elasticsearch for the Coldbox Framework", | ||
"author":"Ortus Solutions <[email protected]", | ||
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbelasticsearch/@build.version@/[email protected]@[email protected]@.zip", | ||
"version":"3.0.3", | ||
"version":"3.1.0", | ||
"slug":"cbelasticsearch", | ||
"type":"modules", | ||
"homepage":"https://cbelasticsearch.ortusbooks.com", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.