go fist
1.0.0
Golang Client untuk berinteraksi dengan Fist, server pencarian indeks teks lengkap minimalis dengan fokus pada menjaga hal-hal sederhana
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 ) // [] Contoh yang lebih rinci dapat ditemukan di bawah subpackage ./examples
Setiap kali versi baru untuk server akan dirilis, jadi kliennya untuk menjaga pemasangan versi klien/server yang langsung dan mudah diikuti
Dirilis berdasarkan ketentuan lisensi MIT. Lihat lisensi untuk detail lebih lanjut.