elasthink
An alternative to elasticsearch engine written in Go for small set of documents that uses inverted index to build the index and utilizes redis to store the indexes.
Table of Contents
Use Cases
- Create Index for a document (needs
document_type,document_id, anddocument_name) - Update Index of a document (needs
document_type,document_id, anddocument_name) - Search document_id by document name using search term (needs
document_typeandsearch_term) - Keyword Suggestion by prefix (needs
document_typeandkeyword_prefix)
Elasthink SDK
Coming Soon!
With the SDK, you can run all the core functionality of elasthink from your go service by providing a redis connection and without setting up a dedicated elasthink server.
Currently, the SDK is on preparation for the release. So stay tuned to get the latest update.
Installation
- To install elasthink, you need to run
$ go get github.com/SurgicalSteel/elasthink - Then you need to specify your redis addresses for each environment in
files/config/redisfolder - To start with your own document, you need to modify the document type const in
entity/document.goand its validation function inmodule/document.go - To build elasthink, run
$ go build - To view all available flags, run
$ ./elasthink -h - To run elasthink, run
$ ./elasthink -env={your-environment} -swr={stopword Removal option (true/false)}and your elasthink web service should run onlocalhost:9000
Documentation
API documentation (insomnia format) is available in the elasthink_insomnia_api_documentation.json. You can open it using Insomnia REST Client
For code documentation, we use standard godoc as our code documentation tool. To view the code documentation, follow these steps :
- Open your terminal, head to this cloned repo (SurgicalSteel/elasthink)
- run
godoc -http=:6060(this will trigger godoc at port 6060) - Open your browser, and hit
http://127.0.0.1:6060/pkg/github.com/SurgicalSteel/elasthink/
Dependencies
Reference
E-Book Redis in Action Part 2 Chapter 7
Additional Note
Currently, elasthink supports stopwords removal option when doing tokenization for document name and search term. But, for now we only support stopwords removal for bahasa Indonesia (Indonesian).

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

