Typesense - Fast, typo tolerant, fuzzy search engine for building delightful search experiences
-
Typesense is a fast, typo-tolerant search engine for building delightful search experiences.An Open Source Algolia Alternative &
An Easier-to-Use ElasticSearch Alternative
https://typesense.org/
https://github.com/anthonynsimon/typesense
https://hub.docker.com/r/typesense/typesense/
https://typesense.org/docs/0.21.0/guide/install-typesense.html#-start -
This looks really simple to package as a single binary and has it's own /health check api endpoint.
Not sure if we have a way to export from Cloudron API stuff to search for, such as a list of all WP sites, or all Surfer sites or even better all web hosting apps.
@staff what do you think?
-
Did you know this is a viable and faster drop in alternative to packaging Elastic Search?
This might help us move forward on several packages that have ES included but makes packaging difficult.
-
As there is a single binary for ubuntu Linux, we may just create a Dockerfile to fetch the binary from https://dl.typesense.org/releases/0.25.2/typesense-server-0.25.2-linux-amd64.tar.gz and run it with the required parameters like
./typesense-server --data-dir=$(pwd)/typesense-data --api-key=$TYPESENSE_API_KEY --enable-cors
We may also need to have a dummy http server for the Cloudron Healthcheck. I did something similar already with the telegramm-chatgpt-bot custom App.We can use the existing healthcheck of the binary:
curl http://localhost:8108/health {"ok":true}
-
I put the initial package to my Repo
Things to consider before use:
- You have to put an valid API Key to the .env file in /app/data (and restart the App)
- The App is available to anybody (not sure if this should be? otherwise the client libraries may not be able to reach the app)
- As I don't have an API Key, I was not able to test it more than just starting it
-
@Kubernetes I think the API key is for other apps to be able to use it. The initial Admin API key is in the docs example .ini file. New ones need to be created for less scope to use in apps.
I installed the binary in one of my Surfer apps, so it's only reachable from the internal docker network for other apps.
There is a WP plugin for it: https://wordpress.org/plugins/search-with-typesense/
Other apps need API integration with their own API keys generated for the apps in a more limited scope.
-
There are two community developed dashboards:
https://github.com/bfritscher/typesense-dashboard
https://github.com/amartya-dev/typesense-dashboardThese should be integrated into your package @Kubernetes !!
For testing, there is a browser based one too (love the dark mode):
https://github.com/philipeachille/typesense-uiUPDATE: I got typesensu-ui to work easily in Surfer, just edit the js/typesense-api.js file to match your typesense-server.ini (make sure
enable-cors = true
is set). The demo data is useful to see it work and it's FAST.