A standalone lightweight full-text search engine built on top of blevesearch and Go with multiple storage (scorch, boltdb, leveldb, badger)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore updated the gitignore Nov 22, 2018
README.md updated the README Nov 21, 2018
_config.yml Set theme jekyll-theme-architect Nov 22, 2018
go.mod added libsrchx as a dependancy Nov 24, 2018
go.sum added libsrchx as a dependancy Nov 24, 2018
main.go initial push Nov 21, 2018
query_request.go initial push Nov 21, 2018
routes.go cleaned some code Nov 21, 2018
vars.go added workers support Dec 2, 2018

README.md

SRCHX

A standalone lightweight full-text search engine built on top of blevesearch and Go with multiple storage (scorch, boltdb, leveldb, badgerdb)

Features

  • Standanlone.
  • Light & Fast.
  • Utilizes the full CPU cores, thanks to Go runtime.
  • Pluggable storage engines, badgerdb (pure Go rocksdb alternative), boltdb, leveldb, scorch.
  • Simple & Neat RESTful API.
  • Dynamic Index Creation, you don't need to create an index, just POST your data to the indexing endpoint.
  • You can search for your documents instantly.

Installation

  1. Goto Releases Page
  2. Choose your platform based version
  3. Download it
  4. Copy/Rename it as ./srchx
  5. Run chmod +x ./srchx
  6. Run ./srchx --help to see help info

Examples

# Example 1
# Add new document to the index "twitter" and type "tweet"
$ curl --request POST \
  --url 'http://localhost:2050/twitter/tweets/_doc/new' \
  --header 'Content-Type: application/json' \
  --data '{
	"user": "u5",
	"content": "this is my tweet",
	"views": 5
}'

# Example 2
# Fetch the previously added document using its ID
$ curl http://localhost:2050/twitter/tweets/_doc/2552b636-002e-4f1a-98b1-bdb06c2464ac

# Example 3
# Search for the documents that contains u5
$ curl http://localhost:2050/twitter/tweets/_search?query=+user:u5

API Documentation

I published the API docs on postman here with examples.

Refs

  1. Blevesearch
  2. QueryStringQuery
  3. Sorting

About Me

A Gopher who likes to build tiny things that make big change.