Go client library for Hanzo Search (Meilisearch compatible).
Category: Hanzo Ecosystem Related Skills: hanzo/go-sdk.md, hanzo/hanzo-kv-go.md
Go client library for Hanzo Search (Meilisearch compatible). Fork of meilisearch/meilisearch-go with module path rewritten to github.com/hanzoai/search-go. The Go package name is meilisearch. Provides index management, document CRUD, search with filters/facets/highlighting, settings management, task monitoring, chat, and webhook support.
Fork of meilisearch-go (meilisearch/meilisearch-go). Repo: hanzoai/search-go, branch: main.
| Item | Value | |------|-------| | Module | github.com/hanzoai/search-go | | Package | meilisearch | | Version | 0.36.1 | | Go | 1.26+ | | Repo | github.com/hanzoai/search-go | | Branch | main | | License | MIT | | Protocol | HTTP/REST |
go get github.com/hanzoai/search-go
package main
import (
"fmt"
search "github.com/hanzoai/search-go"
)
func main() {
client := search.New("http://localhost:7700", search.WithAPIKey("your-api-key"))
// Create index
task, _ := client.CreateIndex(&search.IndexConfig{
Uid: "movies",
PrimaryKey: "id",
})
fmt.Println("Task:", task.TaskUID)
// Add documents
index := client.Index("movies")
docs := []map[string]interface{}{
{"id": 1, "title": "Carol", "genres": []string{"Romance", "Drama"}},
{"id": 2, "title": "Wonder Woman", "genres": []string{"Action"}},
}
task, _ = index.AddDocuments(docs, nil)
// Search
res, _ := index.Search("wonder", &search.SearchRequest{Limit: 10})
fmt.Println(res.Hits)
}
client := search.New("http://localhost:7700",
search.WithAPIKey("your-api-key"),
search.WithCustomClient(http.DefaultClient),
search.WithContentEncoding(search.GzipEncoding, search.BestCompression),
search.WithCustomRetries([]int{502, 503, 504}, 3),
)
| Option | Description | |--------|-------------| | WithAPIKey | API key for authentication | | WithCustomClient | Custom http.Client | | WithCustomClientWithTLS | Enable TLS | | WithContentEncoding | Request/response encoding | | WithCustomRetries | Retry by status code and max retries | | DisableRetries | Disable automatic retries |
go build ./...
go test ./...
# Integration tests require a running Meilisearch instance
Last Updated: 2026-03-13 Category: Hanzo Ecosystem Related: search, meilisearch, full-text, go, client Prerequisites: Go 1.26+