BoxLang 🚀 A New JVM Dynamic Language Learn More...
An API wrapper for Meilisearch written in CFML for the ColdBox platform.
box install cbmeilisearch
Client
model: getInstance( "Client@cbmeilisearch" )
msClient.createIndex( "movies" )
From the Meilisearch Quickstart guide:
# Fetch the latest version of Meilisearch image from DockerHub
docker pull getmeili/meilisearch:v0.30
# Launch Meilisearch in development mode with a master key
docker run --detach --rm \
-p 7700:7700 \
-e MEILI_MASTER_KEY='mySecretKey'\
getmeili/meilisearch:v0.30 \
meilisearch \
--env="development"
CBMeilisearch will try to pull Meilisearch connection settings from the environment variables by default. You can take advantage of this by creating a .env
file in the root of your ColdBox app and using commandbox-dotenv
or a similar tool to load the .env
file into your application on startup.
# .env
MEILISEARCH_HOST=http://127.0.0.1
MEILISEARCH_PORT=7700
MEILISEARCH_MASTER_KEY=mySecretKey
Use the following example configuration to get started configuring cbMeilisearch.
For obvious reasons, the host/port must point to a running Meilisearch instance, and the MEILISEARCH_MASTER_KEY
must be the configured master key you set when starting Meilisearch.
// config/Coldbox.cfc
component{
function configure(){
moduleSettings = {
"cbmeilisearch" : {
"MEILISEARCH_HOST" : "localhost",
"MEILISEARCH_PORT" : 7700,
"MEILISEARCH_MASTER_KEY" : "mySecretKey"
}
}
}
}
This library follows the Meilisearch API reference as closely as possible.
This package guarantees compatibility with Meilisearch versions:
Versions v0.27.x
and below are NOT supported due to the breaking changes introduced in v0.28.0
.
Looking to contribute? I'd love to see help in these areas:
Apache License, Version 2.0.
The ColdBox Websites, logo and content have a separate license and they are a separate entity.
For all have sinned, and come short of the glory of God (Romans 3:23)
But God commendeth his love toward us, in that, while we were yet sinners, Christ died for us. (Romans 5:8)
That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved. (Romans 10:9)
Copyright 2022 (and on) - Ortus Solutions
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
$
box install cbmeilisearch