RusticSearch is an open source general purpose HTTP search server that is minimalist and built with commitment to ruthless practicality. It makes it easy to build in the search functionality for your website that is simple, reliable and efficient.
The project is currently under development and should not be used for anything else but idle fiddling.
The easiest way to install the tool would be using go get command (you may need to install go
tools first):
go install git@github.com:dborzov/rusticsearch
This will download the source files to your $GOPATH/src/github.com/dborzov/rusticsearch
, compile them and put the binary rusticsearch
into $GOPATH/bin
.
Run rusticsearch -help
to see the configurable flags:
$ rusticsearch -help
Hi, I am Rustic Search Server!
Usage of rusticsearch:
-DBaddr="username@tcp(host)/tablename": Database connection address
-configFile="rusticsearch.config": configuration json filepath
-port=8080: a serving TCP port
-refreshTime=10: time period (in minutes) when the search index is refreshed
It should be pretty straightforward for the most part. DBaddr
here defines the connection credentials for a MySQl database in the following format:
[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...¶mN=valueN]
Here is the search algorithm to be implemented. Checkbox marks if it is actually implemented just yet:
- Lower the register of the query and attempt looking up the exact match. If we get enough matches, stop.
- Search for error-corrected query with distane one from the correct one (including symbol permutations) using this approach. If we get enough matches, stop.
- Split query into words and search for each word separately. Then count total frequency of matches for each item and return the responses in that order.