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.
- 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_type
andsearch_term
) - Keyword Suggestion by prefix (needs
document_type
andkeyword_prefix
)
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.
- 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/redis
folder - To start with your own document, you need to modify the document type const in
entity/document.go
and 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
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/
E-Book Redis in Action Part 2 Chapter 7
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).