All Projects → manticoresoftware → go-sdk

manticoresoftware / go-sdk

Licence: Apache-2.0 License
Go client for Manticore Search

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to go-sdk

docker
Official docker for Manticore Search
Stars: ✭ 39 (+77.27%)
Mutual labels:  sphinxsearch, manticoresearch
sphinxql
SphinxQL query builder for Node.js. sphinxql package supports Manticore Search and Sphinx Search
Stars: ✭ 21 (-4.55%)
Mutual labels:  sphinxsearch, manticoresearch
goar
Arweave http client and wallet implemented in go, Arweave SDK
Stars: ✭ 60 (+172.73%)
Mutual labels:  sdk-go
php-sphinx-search
Sphinx for PHP 5.3 and above. Fully PHPUnit tested.
Stars: ✭ 19 (-13.64%)
Mutual labels:  sphinxsearch
go-kkbox
KKBOX Open API SDK for Golang.
Stars: ✭ 16 (-27.27%)
Mutual labels:  sdk-go
go-teamcity
Golang client for TeamCity REST API
Stars: ✭ 32 (+45.45%)
Mutual labels:  sdk-go
platform-services-go-sdk
Go client library for IBM Cloud Platform Services
Stars: ✭ 14 (-36.36%)
Mutual labels:  sdk-go
hedera-sdk-go
Hedera™ Hashgraph SDK for Go
Stars: ✭ 63 (+186.36%)
Mutual labels:  sdk-go
veryfi-go
Go module for communicating with the Veryfi OCR API
Stars: ✭ 18 (-18.18%)
Mutual labels:  sdk-go
go-apple-music
A Go client library for accessing the Apple Music API.
Stars: ✭ 83 (+277.27%)
Mutual labels:  sdk-go
go-stone-openbank
A Go library to connect with Stone Open Banking API
Stars: ✭ 31 (+40.91%)
Mutual labels:  sdk-go
biligo
🚀 BiliBili API SDK in Golang
Stars: ✭ 29 (+31.82%)
Mutual labels:  sdk-go

Official Go client for Manticore Search.

Compatibility

The client is compatible with Manticore Search 2.8.2 and higher for majority of the commands. It also may be used in many cases to access SphinxSearch daemon as well. However it's not guaranteed.

Requirements

Go version 1.9 or higher

Installation

go get github.com/manticoresoftware/go-sdk/manticore

Usage

Here's a short example on how the client can be used: Make sure there's some running Manticore instance, you can use our docker image for a quick test:

docker run --name manticore -p 9313:9312 -p9306:9306 -d manticoresearch/manticore

Here's just a simplest script:

[root@srv ~]# cat manticore.go
package main

import "github.com/manticoresoftware/go-sdk/manticore"
import "fmt"

func main() {
	cl := manticore.NewClient()
	cl.SetServer("127.0.0.1", 9313)
	cl.Open()
	res, err := cl.Sphinxql(`replace into testrt values(1,'my subject', 'my content', 15)`)
	fmt.Println(res, err)
	res, err = cl.Sphinxql(`replace into testrt values(2,'another subject', 'more content', 15)`)
	fmt.Println(res, err)
	res, err = cl.Sphinxql(`replace into testrt values(5,'again subject', 'one more content', 10)`)
	fmt.Println(res, err)
	res2, err2 := cl.Query("more|another", "testrt")
	fmt.Println(res2, err2)
}

And here's how it works:

[root@srv ~]# go run manticore.go
[Query OK, 1 rows affected] <nil>
[Query OK, 1 rows affected] <nil>
[Query OK, 1 rows affected] <nil>
Status: ok
Query time: 0s
Total: 1
Total found: 1
Schema:
	Fields:
		title
		content
	Attributes:
		gid: int
Matches:
	Doc: 2, Weight: 2, attrs: [15]
Word stats:
	'more' (Docs:2, Hits:2)
	'another' (Docs:1, Hits:1)
 <nil>

Read full documentation on godoc to learn more about available functions and find more examples. You can also read it from the console as go doc go-sdk/manticore

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].