All Projects → algolia → Algoliasearch Client Go

algolia / Algoliasearch Client Go

Licence: mit
⚡️ A fully-featured and blazing-fast Go API client to interact with Algolia.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Algoliasearch Client Go

Algoliasearch Client Javascript
⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.
Stars: ✭ 907 (+517.01%)
Mutual labels:  api-client, algolia, search
Algoliasearch Client Android
Algolia Search API Client for Android
Stars: ✭ 92 (-37.41%)
Mutual labels:  api-client, algolia, search
Algoliasearch Client Php
⚡️ A fully-featured and blazing-fast PHP API client to interact with Algolia.
Stars: ✭ 565 (+284.35%)
Mutual labels:  api-client, algolia, search
Algoliasearch Client Python
⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
Stars: ✭ 138 (-6.12%)
Mutual labels:  algolia, search
Jekyll Theme Basically Basic
Your new Jekyll default theme
Stars: ✭ 524 (+256.46%)
Mutual labels:  algolia, search
Vue Instantsearch
👀 Algolia components for building search UIs with Vue.js
Stars: ✭ 707 (+380.95%)
Mutual labels:  algolia, search
Algoliasearch Rails
AlgoliaSearch integration to your favorite ORM
Stars: ✭ 352 (+139.46%)
Mutual labels:  algolia, search
App Search Php
Elastic App Search Official PHP Client
Stars: ✭ 48 (-67.35%)
Mutual labels:  api-client, search
App Search Node
Elastic App Search Official Node.js Client
Stars: ✭ 29 (-80.27%)
Mutual labels:  api-client, search
Algoliasearch Helper Js
Helper for implementing advanced search features with Algolia
Stars: ✭ 147 (+0%)
Mutual labels:  algolia, search
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+762.59%)
Mutual labels:  algolia, search
Docsearch
📘 The easiest way to add search to your documentation.
Stars: ✭ 2,266 (+1441.5%)
Mutual labels:  algolia, search
Instantsearch Ios
⚡️ A library of widgets and helpers to build instant-search applications on iOS.
Stars: ✭ 498 (+238.78%)
Mutual labels:  algolia, search
Instantsearch Android
A library of widgets and helpers to build instant-search applications on Android.
Stars: ✭ 129 (-12.24%)
Mutual labels:  algolia, search
Awesome Algolia
🔍👋 START HERE! A curated list of Algolia libraries, resources and projects.
Stars: ✭ 475 (+223.13%)
Mutual labels:  algolia, search
Github Awesome Autocomplete
Add instant search capabilities to GitHub's search bar
Stars: ✭ 1,015 (+590.48%)
Mutual labels:  algolia, search
Scout Extended
Scout Extended: The Full Power of Algolia in Laravel
Stars: ✭ 330 (+124.49%)
Mutual labels:  algolia, search
Docsearch Configs
DocSearch - Configurations
Stars: ✭ 339 (+130.61%)
Mutual labels:  algolia, search
Instantsearch Ios Examples
Example apps built with InstantSearch iOS
Stars: ✭ 55 (-62.59%)
Mutual labels:  algolia, search
React Instantsearch
⚡️ Lightning-fast search for React and React Native applications, by Algolia.
Stars: ✭ 1,320 (+797.96%)
Mutual labels:  algolia, search

Algolia for Go

The perfect starting point to integrate Algolia within your Go project

CircleCI Github Releases GoDoc Go Report Card License Supported version

DocumentationCommunity ForumStack OverflowReport a bugFAQSupport

✨ Features

  • Support Go 1.11 and above
  • Typed requests and responses
  • First-class support for user-defined structures
  • Injectable HTTP client

Migration note from v2.x to v3.x

In June 2019, we released v3 of our Go client. If you are using version 2.x of the client, read the migration guide to version 3.x. Version 2.x will no longer be under active development.

💡 Getting Started

First, add the Algolia Go API Client as a new module to your Go project:

# First line is optional if your project is already defined as a Go module
go mod init <YOUR_PROJECT_NAME>
go get github.com/algolia/algoliasearch-client-go/[email protected]

Then, create objects on your index:

package main

import "github.com/algolia/algoliasearch-client-go/v3/algolia/search"

type Contact struct {
	ObjectID string `json:"objectID"`
	Name     string `json:"name"`
}

func main() {
	client := search.NewClient("YourApplicationID", "YourAPIKey")
	index := client.InitIndex("your_index_name")

	res, err := index.SaveObjects([]Contact{
		{ObjectID: "1", Name: "Foo"},
	})
}

Finally, you may begin searching a object using the Search method:

package main

import (
	"fmt"
	"os"

	"github.com/algolia/algoliasearch-client-go/v3/algolia/search"
)

type Contact struct {
	ObjectID string `json:"objectID"`
	Name     string `json:"name"`
}

func main() {
	client := search.NewClient("YourApplicationID", "YourAPIKey")
	index := client.InitIndex("your_index_name")

	res, err := index.Search("Foo")
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}

	var contacts []Contact

	err = res.UnmarshalHits(&contacts)
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}

	fmt.Println(contacts)
}

For full documentation, visit the Algolia Go API Client.

❓ Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client.

📄 License

Algolia Go API Client is an open-sourced software licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].