go fist
1.0.0
golangクライアントは、物事をシンプルに保つことに焦点を当てたミニマリストのフルテキストインデックス検索サーバーである拳と対話するためのクライアント
go get -u github.com/sonirico/go-fist
import fistClient "github.com/sonirico/go-fist"
// ...
client , err := fistClient . NewFistClient ( "localhost" , "5575" )
if err != nil {
fmt . Println ( "Connection Error! Is Fist up and running?" )
return
}
// Obtain server version
version , _ := client . Version ()
fmt . Println ( "Server version is " + version )
// Index some data
client . Index ( "articles" , "a an the" )
client . Index ( "TODO" , "wash the car" )
client . Index ( "TODO" , "walk the dog" )
client . Index ( "podcasts" , "DSE - Daily software engineering" )
// Search for "the" keyword
documents := client . Search ( "the" )
fmt . Println ( documents ) // ["articles", "TODO"]
// Not needing articles?
client . Delete ( "the" )
documents = client . Search ( "the" )
fmt . Println ( documents ) // []より詳細な例は./examples examplesのサブパッケージの下にあります
サーバー用の新しいバージョンがリリースされるたびに、クライアント/サーバーバージョンのミラーリングを直接フォローできるようにクライアントがリリースする場合があります。
MITライセンスの条件に基づいてリリースされます。詳細については、ライセンスを参照してください。