Versions in this module Expand all Collapse all v2 v2.1.1 Jul 25, 2022 Changes in this version + const Flat + const GroupByReducerAvg + const GroupByReducerCount + const GroupByReducerCountDistinct + const GroupByReducerCountDistinctish + const GroupByReducerFirstValue + const GroupByReducerMax + const GroupByReducerMin + const GroupByReducerQuantile + const GroupByReducerRandomSample + const GroupByReducerStdDev + const GroupByReducerSum + const GroupByReducerToList + const HNSW + var DefaultIndexingOptions = IndexingOptions + var DefaultOptions = Options + var DefaultSuggestOptions = SuggestOptions + func EscapeTextFileString(value string) string + func ProcessAggResponse(res []interface{}) [][]string + func ProcessAggResponseSS(res []interface{}) [][]string + func SerializeIndexingOptions(opts IndexingOptions, args redis.Args) redis.Args + func SerializeSchema(s *Schema, args redis.Args) (argsOut redis.Args, err error) + type AggregateQuery struct + AggregatePlan redis.Args + Cursor *Cursor + Max int + Paging *Paging + Query *Query + Verbatim bool + WithCursor bool + WithSchema bool + func NewAggregateQuery() *AggregateQuery + func (a *AggregateQuery) Apply(expression Projection) *AggregateQuery + func (a *AggregateQuery) CursorHasResults() (res bool) + func (a *AggregateQuery) Filter(expression string) *AggregateQuery + func (a *AggregateQuery) GroupBy(group GroupBy) *AggregateQuery + func (a *AggregateQuery) Limit(offset int, num int) *AggregateQuery + func (a *AggregateQuery) Load(Properties []string) *AggregateQuery + func (a *AggregateQuery) SetCursor(cursor *Cursor) *AggregateQuery + func (a *AggregateQuery) SetMax(value int) *AggregateQuery + func (a *AggregateQuery) SetQuery(query *Query) *AggregateQuery + func (a *AggregateQuery) SetVerbatim(value bool) *AggregateQuery + func (a *AggregateQuery) SetWithSchema(value bool) *AggregateQuery + func (a *AggregateQuery) SortBy(SortByProperties []SortingKey) *AggregateQuery + func (q AggregateQuery) Serialize() redis.Args + type Autocompleter struct + func NewAutocompleter(addr, name string) *Autocompleter + func NewAutocompleterFromPool(pool *redis.Pool, name string) *Autocompleter + func (a *Autocompleter) AddTerms(terms ...Suggestion) error + func (a *Autocompleter) Delete() error + func (a *Autocompleter) DeleteTerms(terms ...Suggestion) error + func (a *Autocompleter) Length() (len int64, err error) + func (a *Autocompleter) Serialize(prefix string, opts SuggestOptions) (redis.Args, int) + func (a *Autocompleter) Suggest(prefix string, num int, fuzzy bool) (ret []Suggestion, err error) + func (a *Autocompleter) SuggestOpts(prefix string, opts SuggestOptions) (ret []Suggestion, err error) + type Client struct + func NewClient(addr, name string) *Client + func NewClientFromPool(pool *redis.Pool, name string) *Client + func (i *Client) AddField(f Field) error + func (i *Client) AddHash(docId string, score float32, language string, replace bool) (string, error) + func (i *Client) Aggregate(q *AggregateQuery) (aggregateReply [][]string, total int, err error) + func (i *Client) AggregateQuery(q *AggregateQuery) (total int, aggregateReply []map[string]interface{}, err error) + func (i *Client) AliasAdd(name string) (err error) + func (i *Client) AliasDel(name string) (err error) + func (i *Client) AliasUpdate(name string) (err error) + func (i *Client) CreateIndex(schema *Schema) (err error) + func (i *Client) CreateIndexWithIndexDefinition(schema *Schema, definition *IndexDefinition) (err error) + func (i *Client) Delete(docId string, deleteDocument bool) (err error) + func (i *Client) DeleteDocument(docId string) (err error) + func (i *Client) DictAdd(dictionaryName string, terms []string) (newTerms int, err error) + func (i *Client) DictDel(dictionaryName string, terms []string) (deletedTerms int, err error) + func (i *Client) DictDump(dictionaryName string) (terms []string, err error) + func (i *Client) Drop() error + func (i *Client) DropIndex(deleteDocuments bool) error + func (i *Client) Explain(q *Query) (string, error) + func (i *Client) Get(docId string) (doc *Document, err error) + func (i *Client) GetConfig(option string) (map[string]string, error) + func (i *Client) GetTagVals(index string, filedName string) ([]string, error) + func (i *Client) Index(docs ...Document) error + func (i *Client) IndexOptions(opts IndexingOptions, docs ...Document) error + func (i *Client) Info() (*IndexInfo, error) + func (i *Client) List() ([]string, error) + func (i *Client) MultiGet(documentIds []string) (docs []*Document, err error) + func (i *Client) Search(q *Query) (docs []Document, total int, err error) + func (i *Client) SetConfig(option string, value string) (string, error) + func (i *Client) SpellCheck(q *Query, s *SpellCheckOptions) (suggs []MisspelledTerm, total int, err error) + func (i *Client) SynAdd(indexName string, terms []string) (int64, error) + func (i *Client) SynDump(indexName string) (map[string][]int64, error) + func (i *Client) SynUpdate(indexName string, synonymGroupId int64, terms []string) (string, error) + type ConnPool interface + Close func() error + Get func() redis.Conn + type Cursor struct + Count int + Id int + MaxIdle int + func NewCursor() *Cursor + func (c *Cursor) SetCount(count int) *Cursor + func (c *Cursor) SetId(id int) *Cursor + func (c *Cursor) SetMaxIdle(maxIdle int) *Cursor + func (c Cursor) Serialize() redis.Args + type Document struct + Id string + Payload []byte + Properties map[string]interface{} + Score float32 + func NewDocument(id string, score float32) Document + func (d *Document) EstimateSize() (sz int) + func (d *Document) SetPayload(payload []byte) + func (d Document) Set(name string, value interface{}) Document + type DocumentList []Document + func (l DocumentList) Len() int + func (l DocumentList) Less(i, j int) bool + func (l DocumentList) Sort() + func (l DocumentList) Swap(i, j int) + type Field struct + Name string + Options interface{} + Sortable bool + Type FieldType + func NewGeoField(name string) Field + func NewGeoFieldOptions(name string, options GeoFieldOptions) Field + func NewNumericField(name string) Field + func NewNumericFieldOptions(name string, options NumericFieldOptions) Field + func NewSortableNumericField(name string) Field + func NewSortableTextField(name string, weight float32) Field + func NewTagField(name string) Field + func NewTagFieldOptions(name string, opts TagFieldOptions) Field + func NewTextField(name string) Field + func NewTextFieldOptions(name string, opts TextFieldOptions) Field + func NewVectorFieldOptions(name string, options VectorFieldOptions) Field + type FieldType int + const GeoField + const NumericField + const TagField + const TextField + const VectorField + type Filter struct + Field string + Options interface{} + type Flag uint64 + const DefaultNum + const DefaultOffset + const QueryInOrder + const QueryNoContent + const QueryVerbatim + const QueryWithPayloads + const QueryWithScores + const QueryWithStopWords + type GeoFieldOptions struct + As string + NoIndex bool + type GeoFilterOptions struct + Lat float64 + Lon float64 + Radius float64 + Unit Unit + type GroupBy struct + Fields []string + Paging *Paging + Reducers []Reducer + func NewGroupBy() *GroupBy + func (g *GroupBy) AddFields(fields interface{}) *GroupBy + func (g *GroupBy) Limit(offset int, num int) *GroupBy + func (g *GroupBy) Reduce(reducer Reducer) *GroupBy + func (g GroupBy) Serialize() redis.Args + type GroupByReducers string + type HighlightOptions struct + Fields []string + Tags [2]string + type IndexDefinition struct + Async bool + FilterExpression string + IndexOn string + Language string + LanguageField string + PayloadField string + Prefix []string + Score float64 + ScoreField string + func NewIndexDefinition() *IndexDefinition + func (defintion *IndexDefinition) AddPrefix(prefix string) (outDef *IndexDefinition) + func (defintion *IndexDefinition) Serialize(args redis.Args) redis.Args + func (defintion *IndexDefinition) SetAsync(value bool) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetFilterExpression(value string) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetIndexOn(value IndexType) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetLanguage(value string) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetLanguageField(value string) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetPayloadField(value string) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetScore(value float64) (outDef *IndexDefinition) + func (defintion *IndexDefinition) SetScoreField(value string) (outDef *IndexDefinition) + type IndexInfo struct + BytesPerRecordAvg float64 + DocCount uint64 + DocTableSizeMB float64 + HashIndexingFailures uint64 + InvertedIndexSizeMB float64 + IsIndexing bool + KeyTableSizeMB float64 + MaxDocID uint64 + Name string + OffsetBitsPerTermAvg float64 + OffsetVectorSizeMB float64 + OffsetsPerTermAvg float64 + PercentIndexed float64 + RecordCount uint64 + RecordsPerDocAvg float64 + Schema Schema + TermCount uint64 + type IndexType int + const HASH + const JSON + func (it IndexType) String() string + type IndexingOptions struct + Language string + NoSave bool + Partial bool + Replace bool + ReplaceCondition string + type MisspelledSuggestion struct + Score float32 + Suggestion string + func NewMisspelledSuggestion(term string, score float32) MisspelledSuggestion + type MisspelledTerm struct + MisspelledSuggestionList []MisspelledSuggestion + Term string + func NewMisspelledTerm(term string) MisspelledTerm + func (l MisspelledTerm) Len() int + func (l MisspelledTerm) Less(i, j int) bool + func (l MisspelledTerm) Sort() + func (l MisspelledTerm) Swap(i, j int) + type MultiError []error + func NewMultiError(len int) MultiError + func (e MultiError) Error() string + type MultiHostPool struct + func NewMultiHostPool(hosts []string) *MultiHostPool + func (p *MultiHostPool) Close() (err error) + func (p *MultiHostPool) Get() redis.Conn + type NumericFieldOptions struct + As string + NoIndex bool + Sortable bool + type NumericFilterOptions struct + ExclusiveMax bool + ExclusiveMin bool + Max float64 + Min float64 + type Operator string + const Between + const BetweenInclusive + const Eq + const Gt + const Gte + const Lt + const Lte + type Options struct + MaxTextFieldsFlag bool + NoFieldFlags bool + NoFrequencies bool + NoHighlights bool + NoOffsetVectors bool + NoSave bool + SkipInitialScan bool + Stopwords []string + Temporary bool + TemporaryPeriod int + func NewOptions() *Options + func (options *Options) SetMaxTextFieldsFlag(flag bool) *Options + func (options *Options) SetNoHighlight(flag bool) *Options + func (options *Options) SetSkipInitialScan(flag bool) *Options + func (options *Options) SetStopWords(stopwords []string) *Options + func (options *Options) SetTemporary(temporary bool) *Options + func (options *Options) SetTemporaryPeriod(period int) *Options + type Paging struct + Num int + Offset int + func NewPaging(offset int, num int) *Paging + type PhoneticMatcherType string + const PhoneticDoubleMetaphoneEnglish + const PhoneticDoubleMetaphoneFrench + const PhoneticDoubleMetaphonePortuguese + const PhoneticDoubleMetaphoneSpanish + type Predicate struct + Operator Operator + Property string + Value []interface{} + func Equals(property string, value interface{}) Predicate + func GreaterThan(property string, value interface{}) Predicate + func GreaterThanEquals(property string, value interface{}) Predicate + func InRange(property string, min, max interface{}, inclusive bool) Predicate + func LessThan(property string, value interface{}) Predicate + func LessThanEquals(property string, value interface{}) Predicate + func NewPredicate(property string, operator Operator, values ...interface{}) Predicate + type Projection struct + Alias string + Expression string + func NewProjection(expression string, alias string) *Projection + func (p Projection) Serialize() redis.Args + type Query struct + Dialect int + Expander string + Filters []Filter + Flags Flag + HighlightOpts *HighlightOptions + InFields []string + InKeys []string + Language string + Paging Paging + Params map[string]interface{} + Payload []byte + Raw string + ReturnFields []string + Scorer string + Slop *int + SortBy *SortingKey + SummarizeOpts *SummaryOptions + func NewQuery(raw string) *Query + func (q *Query) AddFilter(f Filter) *Query + func (q *Query) AddParam(name string, value interface{}) *Query + func (q *Query) AddReturnField(field string, asName string) *Query + func (q *Query) AddReturnFields(fields ...string) *Query + func (q *Query) Highlight(fields []string, openTag, closeTag string) *Query + func (q *Query) Limit(offset, num int) *Query + func (q *Query) SetDialect(dialect int) *Query + func (q *Query) SetExpander(exp string) *Query + func (q *Query) SetFlags(flags Flag) *Query + func (q *Query) SetInFields(fields ...string) *Query + func (q *Query) SetInKeys(keys ...string) *Query + func (q *Query) SetLanguage(lang string) *Query + func (q *Query) SetParams(params map[string]interface{}) *Query + func (q *Query) SetPayload(payload []byte) *Query + func (q *Query) SetReturnFields(fields ...string) *Query + func (q *Query) SetScorer(scorer string) *Query + func (q *Query) SetSortBy(field string, ascending bool) *Query + func (q *Query) Summarize(fields ...string) *Query + func (q *Query) SummarizeOptions(opts SummaryOptions) *Query + type Reducer struct + Alias string + Args []string + Name GroupByReducers + func NewReducer(name GroupByReducers, args []string) *Reducer + func NewReducerAlias(name GroupByReducers, args []string, alias string) *Reducer + func (r *Reducer) SetAlias(a string) *Reducer + func (r *Reducer) SetArgs(args []string) *Reducer + func (r *Reducer) SetName(reducer GroupByReducers) *Reducer + func (r Reducer) Serialize() redis.Args + type Schema struct + Fields []Field + Options Options + func NewSchema(opts Options) *Schema + func (m *Schema) AddField(f Field) *Schema + type SingleHostPool struct + func NewSingleHostPool(host string) *SingleHostPool + type SortingKey struct + Ascending bool + Field string + func NewSortingKeyDir(field string, ascending bool) *SortingKey + func (s SortingKey) Serialize() redis.Args + type SpellCheckOptions struct + Distance int + ExclusionDicts []string + InclusionDicts []string + func NewSpellCheckOptions(distance int) *SpellCheckOptions + func NewSpellCheckOptionsDefaults() *SpellCheckOptions + func (s *SpellCheckOptions) AddExclusionDict(dictname string) *SpellCheckOptions + func (s *SpellCheckOptions) AddInclusionDict(dictname string) *SpellCheckOptions + func (s *SpellCheckOptions) SetDistance(distance int) (*SpellCheckOptions, error) + type SuggestOptions struct + Fuzzy bool + Num int + WithPayloads bool + WithScores bool + type Suggestion struct + Incr bool + Payload string + Score float64 + Term string + func ProcessSugGetVals(vals []string, inc int, WithScores, WithPayloads bool) (ret []Suggestion) + type SuggestionList []Suggestion + func (l SuggestionList) Len() int + func (l SuggestionList) Less(i, j int) bool + func (l SuggestionList) Sort() + func (l SuggestionList) Swap(i, j int) + type SummaryOptions struct + Fields []string + FragmentLen int + NumFragments int + Separator string + type TagFieldOptions struct + As string + CaseSensitive bool + NoIndex bool + Separator byte + Sortable bool + type TextFieldOptions struct + As string + NoIndex bool + NoStem bool + PhoneticMatcher PhoneticMatcherType + Sortable bool + Weight float32 + type Unit string + const FEET + const KILOMETERS + const METERS + const MILES + type VectorFieldOptions struct + Algorithm algorithm + Attributes map[string]interface{} Other modules containing this package github.com/RediSearch/redisearch-go