项目作者: sonirico

项目描述 :
The Golang client library for Fist (Full Index Search Text) search engine
高级语言: Go
项目地址: git://github.com/sonirico/go-fist.git
创建时间: 2019-06-26T20:00:48Z
项目社区:https://github.com/sonirico/go-fist

开源协议:MIT License

下载


Build Status
Coverage Status
Go Report Card
GoDoc
contributions welcome
dependencies: none

Golang client to interact with Fist, a minimalist full-text index search server with
a focus on keeping things simple

Install

  1. go get -u github.com/sonirico/go-fist

Examples

  1. import fistClient "github.com/sonirico/go-fist"
  2. // ...
  3. client, err := fistClient.NewFistClient("localhost", "5575")
  4. if err != nil {
  5. fmt.Println("Connection Error! Is Fist up and running?")
  6. return
  7. }
  8. // Obtain server version
  9. version, _ := client.Version()
  10. fmt.Println("Server version is " + version)
  11. // Index some data
  12. client.Index("articles", "a an the")
  13. client.Index("TODO", "wash the car")
  14. client.Index("TODO", "walk the dog")
  15. client.Index("podcasts", "DSE - Daily software engineering")
  16. // Search for "the" keyword
  17. documents := client.Search("the")
  18. fmt.Println(documents) // ["articles", "TODO"]
  19. // Not needing articles?
  20. client.Delete("the")
  21. documents = client.Search("the")
  22. fmt.Println(documents) // []

More detailed examples can be found under the ./examples subpackage

Release strategy

Every time a new version for the server shall be released, so will the
client so as to keep a direct and easy to follow client/server version
mirroring

License

Released under the terms of the MIT license. Refer to LICENSE
for more details.