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
في كل مرة يتم فيها إصدار إصدار جديد للخادم ، لذلك سوف يحتفظ العميل باحتفاظ بإعادة إصدار عميل/خادم مباشرة وسهلة
تم إصدارها بموجب شروط ترخيص معهد ماساتشوستس للتكنولوجيا. الرجوع إلى الترخيص لمزيد من التفاصيل.