searchgoose
1.0.0

?簡單,分佈,輕巧
靜止的搜索引擎實現在GO中?
SearchGoose是簡單的分佈式RESTFULE搜索引擎支持搜索和索引數據。出於研究目的,主要了解如何構建Elasticearch的實現細節,重點是群集分佈式系統,並使用BLEVE支持全文搜索。 SearchGoose的目的是通過解決現有關係數據庫的問題來提供快速,靈活的數據處理,這困擾著搜索和分配字符串數據的任務。為了解決此問題,該項目使用一個數據結構,稱為倒置索引,該索引支持快速的全文搜索。它還在聚類模式下實現了類似Raft的算法和基於法定的投票系統,以進行發現和選舉服務。


$ docker build . --rm --tag searchgoose:latest$ make build$ go run main.go -transport.port=8180 -http.port=8080$ go run main.go -node.name=sg-node-01 -transport.port=8180 -http.port=8080
$ go run main.go -node.name=sg-node-02 -seed_hosts=127.0.0.1:8180 -transport.port=8179 -http.port=8081
$ go run main.go -node.name=sg-node-03 -seed_hosts=127.0.0.1:8180 -transport.port=8181 -http.port=8082要嘗試以下任何查詢,您可以使用上述示例Quries
PUT /test15
content-type: application/json
{
"settings": {
"number_of_shards": 3
},
"mappings": {
"properties": {
"field1": {
"type": "text"
}
}
}
}
PUT /test15/_doc/4
content-type: application/json
{
"field1": "test",
"field2": "test2"
}
POST /test15/_search
content-type: application/json
{
"size": 100,
"query": {
"match": {
"field1": "field test"
}
}
}
上圖描述了使用Guttenberg-search進行SearchGoose測試應用程序。
上圖描述了通過Elasticsearch-HQ管理和監視SearchGoose群集的簡化界面。