go fist
1.0.0
Golang Client pour interagir avec Fist, un serveur de recherche d'index à texte intégral minimaliste en mettant l'accent sur la maintenance des choses simples
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 ) // [] Des exemples plus détaillés peuvent être trouvés sous le sous-pack ./examples
Chaque fois qu'une nouvelle version pour le serveur doit être publiée, le client sera donc de manière à garder une version du client / serveur direct directement et facile à suivre
Libéré selon les termes de la licence du MIT. Reportez-vous à la licence pour plus de détails.