Algolia Assist
How can I help you today?
I search through your content to help you find answers to your questions, fast.
Features
-
Gives API access to all Algolia functionality, settings, advanced features, and ML/AI products
-
Typed requests and responses
-
First-class support for user-defined structures
-
Background retry strategy to ensure uptime
-
Seamless batching via iterators to optimize number of network calls
-
Zero downtime reindexing feature
-
Injectable HTTP client
Version
-
Supports Go 1.11 and above
Related Integrations
- Android, Javascript, Firebase
- InstantSearch for React, Vue, Angular, vanilla
- Autocomplete
Get started
INSTALL
go get github.com/algolia/algoliasearch-client-go/v3@v3.Y.Z
INDEX
type Contact struct {
ObjectID string `json:"objectID"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
}
contacts := []Contact{
{ObjectID: "myID1", Firstname: "Jimmie", Lastname: "Barninger"},
{ObjectID: "myID2", Firstname: "Ray", Lastname: "Charles"},
}
res, err := index.SaveObjects(contacts)
SEARCH
params := []interface{}{
opt.AttributesToRetrieve("firstname", "lastname"),
opt.HitsPerPage(50),
}
res, err := index.Search("jimmie paint", params...)
