All Projects → RediSearch → Redisearch Go

RediSearch / Redisearch Go

Licence: bsd-3-clause
Go client for RediSearch

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Redisearch Go

Php Redis Client
RedisClient is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0
Stars: ✭ 112 (-3.45%)
Mutual labels:  redis, redis-client
Goredis
redis client for golang
Stars: ✭ 59 (-49.14%)
Mutual labels:  redis, redis-client
Perfect Redis
A Swift client for Redis.
Stars: ✭ 26 (-77.59%)
Mutual labels:  redis, redis-client
Hslcommunication
An industrial IoT underlying architecture framework, focusing on the underlying technical communications and cross-platform, cross-language communication functions, to achieve a variety of mainstream PLC data reading and writing, to achieve modbus of various protocols read and write, and so on, to support the rapid construction of industrial upper computer software, configuration software, SCADA software, factory mes system, To help enterprise Industry 4.0 take-off, to achieve intelligent manufacturing, smart factory goals. The main PLC contains Siemens, Mitsubishi, Omron, Panasonic, Modbus, AB-PLC, Redis
Stars: ✭ 816 (+603.45%)
Mutual labels:  redis, redis-client
Godis
redis client implement by golang, inspired by jedis.
Stars: ✭ 87 (-25%)
Mutual labels:  redis, redis-client
Redix
Fast, pipelined, resilient Redis driver for Elixir. 🛍
Stars: ✭ 816 (+603.45%)
Mutual labels:  redis, redis-client
Php Redis Implementation
Raw wrapper for real Redis fans.
Stars: ✭ 48 (-58.62%)
Mutual labels:  redis, redis-client
Quick redis blog
QuickRedis is a free forever Redis Desktop manager. It supports direct connection, sentinel, and cluster mode, supports multiple languages, supports hundreds of millions of keys, and has an amazing UI. Supports both Windows, Mac OS X and Linux platform.
Stars: ✭ 594 (+412.07%)
Mutual labels:  redis, redis-client
Ioredis
🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
Stars: ✭ 9,754 (+8308.62%)
Mutual labels:  redis, redis-client
Redisworks
Pythonic Redis Client
Stars: ✭ 78 (-32.76%)
Mutual labels:  redis, redis-client
Redis Tui
A Redis Text-based UI client in CLI
Stars: ✭ 757 (+552.59%)
Mutual labels:  redis, redis-client
Iredis
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
Stars: ✭ 1,661 (+1331.9%)
Mutual labels:  redis, redis-client
Iodine
iodine - HTTP / WebSockets Server for Ruby with Pub/Sub support
Stars: ✭ 720 (+520.69%)
Mutual labels:  redis, redis-client
Redis Py Cluster
Python cluster client for the official redis cluster. Redis 3.0+.
Stars: ✭ 934 (+705.17%)
Mutual labels:  redis, redis-client
Redis Operator
Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Stars: ✭ 658 (+467.24%)
Mutual labels:  redis, redis-client
Cpp redis
C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform - NO LONGER MAINTAINED - Please check https://github.com/cpp-redis/cpp_redis
Stars: ✭ 855 (+637.07%)
Mutual labels:  redis, redis-client
Redis Admin
redis client tool,redis web client,redis web ui,spring-boot support
Stars: ✭ 436 (+275.86%)
Mutual labels:  redis, redis-client
Stackexchange.redis
General purpose redis client
Stars: ✭ 4,986 (+4198.28%)
Mutual labels:  redis, redis-client
Micropython Stm Lib
A collection of modules and examples for MicroPython running on an STM32F4DISCOVERY board
Stars: ✭ 64 (-44.83%)
Mutual labels:  redis, redis-client
Redis Cui
Simple, visual command line tool for redis
Stars: ✭ 101 (-12.93%)
Mutual labels:  redis, redis-client

license CircleCI GitHub issues Codecov Go Report Card GoDoc Total alerts

RediSearch Go Client

Forum Discord

Go client for RediSearch, based on redigo.

Installing

go get github.com/RediSearch/redisearch-go/redisearch

Usage Example

package main 
import (
	"fmt"
	"log"
	"time"

	"github.com/RediSearch/redisearch-go/redisearch"
)

func ExampleClient() {

	// Create a client. By default a client is schemaless
	// unless a schema is provided when creating the index
	c := redisearch.NewClient("localhost:6379", "myIndex")

	// Create a schema
	sc := redisearch.NewSchema(redisearch.DefaultOptions).
		AddField(redisearch.NewTextField("body")).
		AddField(redisearch.NewTextFieldOptions("title", redisearch.TextFieldOptions{Weight: 5.0, Sortable: true})).
		AddField(redisearch.NewNumericField("date"))

	// Drop an existing index. If the index does not exist an error is returned
	c.Drop()

	// Create the index with the given schema
	if err := c.CreateIndex(sc); err != nil {
		log.Fatal(err)
	}

	// Create a document with an id and given score
	doc := redisearch.NewDocument("doc1", 1.0)
	doc.Set("title", "Hello world").
		Set("body", "foo bar").
		Set("date", time.Now().Unix())

	// Index the document. The API accepts multiple documents at a time
	if err := c.Index([]redisearch.Document{doc}...); err != nil {
		log.Fatal(err)
	}

	// Searching with limit and sorting
	docs, total, err := c.Search(redisearch.NewQuery("hello world").
		Limit(0, 2).
		SetReturnFields("title"))

	fmt.Println(docs[0].Id, docs[0].Properties["title"], total, err)
	// Output: doc1 Hello world 1 <nil>
}

Supported RediSearch Commands

Command Recommended API and godoc
FT.CREATE CreateIndex
FT.ADD IndexOptions
FT.ALTER AddField
FT.ALIASADD AliasAdd
FT.ALIASUPDATE AliasUpdate
FT.ALIASDEL AliasDel
FT.INFO Info
FT.SEARCH Search
FT.AGGREGATE Aggregate
FT.CURSOR Aggregate + (*WithCursor option set to True)
FT.EXPLAIN Explain
FT.DEL DeleteDocument
FT.GET Get
FT.MGET MultiGet
FT.DROP Drop
FT.TAGVALS GetTagVals
FT.SUGADD AddTerms
FT.SUGGET SuggestOpts
FT.SUGDEL DeleteTerms
FT.SUGLEN Autocompleter.Length
FT.SYNUPDATE SynUpdate
FT.SYNDUMP SynDump
FT.SPELLCHECK SpellCheck
FT.DICTADD DictAdd
FT.DICTDEL DictDel
FT.DICTDUMP DictDump
FT.CONFIG SetConfigGetConfig
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].