go fist
1.0.0
Golang 클라이언트는 물건을 단순하게 유지하는 데 중점을 둔 미니멀리스트 전체 텍스트 색인 검색 서버 인 FIST와 상호 작용합니다.
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 Subpackage에서 찾을 수 있습니다.
서버의 새 버전이 해제 될 때마다 클라이언트가 직접적이고 쉽게 팔로우하기 쉬운 클라이언트/서버 버전 미러링을 유지할 수 있도록 클라이언트도 마찬가지입니다.
MIT 라이센스의 조건에 따라 릴리스됩니다. 자세한 내용은 라이센스를 참조하십시오.