Skip to content

Commit fcf645e

Browse files
ofekshenawandyakov
andauthored
Apply suggestions from code review
Co-authored-by: Nedyalko Dyakov <[email protected]>
1 parent 1928265 commit fcf645e

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

search_builders.go

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ type AggregateBuilder struct {
218218
}
219219

220220
// NewAggregateBuilder creates a new AggregateBuilder for FT.AGGREGATE commands.
221+
// EXPERIMENTAL: this API is subject to change, use with caution.
221222
func (c *Client) NewAggregateBuilder(ctx context.Context, index, query string) *AggregateBuilder {
222223
return &AggregateBuilder{c: c, ctx: ctx, index: index, query: query, options: &FTAggregateOptions{LimitOffset: -1}}
223224
}
@@ -360,7 +361,8 @@ func (b *AggregateBuilder) Run() (*FTAggregateResult, error) {
360361
// ----------------------
361362
// CreateIndexBuilder for FT.CREATE
362363
// ----------------------
363-
364+
// CreateIndexBuilder is builder for FT.CREATE
365+
// EXPERIMENTAL: this API is subject to change, use with caution.
364366
type CreateIndexBuilder struct {
365367
c *Client
366368
ctx context.Context
@@ -370,6 +372,7 @@ type CreateIndexBuilder struct {
370372
}
371373

372374
// NewCreateIndexBuilder creates a new CreateIndexBuilder for FT.CREATE commands.
375+
// EXPERIMENTAL: this API is subject to change, use with caution.
373376
func (c *Client) NewCreateIndexBuilder(ctx context.Context, index string) *CreateIndexBuilder {
374377
return &CreateIndexBuilder{c: c, ctx: ctx, index: index, options: &FTCreateOptions{}}
375378
}
@@ -467,7 +470,8 @@ func (b *CreateIndexBuilder) Run() (string, error) {
467470
// ----------------------
468471
// DropIndexBuilder for FT.DROPINDEX
469472
// ----------------------
470-
473+
// DropIndexBuilder is a builder for FT.DROPINDEX
474+
// EXPERIMENTAL: this API is subject to change, use with caution.
471475
type DropIndexBuilder struct {
472476
c *Client
473477
ctx context.Context
@@ -476,6 +480,7 @@ type DropIndexBuilder struct {
476480
}
477481

478482
// NewDropIndexBuilder creates a new DropIndexBuilder for FT.DROPINDEX commands.
483+
// EXPERIMENTAL: this API is subject to change, use with caution.
479484
func (c *Client) NewDropIndexBuilder(ctx context.Context, index string) *DropIndexBuilder {
480485
return &DropIndexBuilder{c: c, ctx: ctx, index: index}
481486
}
@@ -492,7 +497,8 @@ func (b *DropIndexBuilder) Run() (string, error) {
492497
// ----------------------
493498
// AliasBuilder for FT.ALIAS* commands
494499
// ----------------------
495-
500+
// AliasBuilder is builder for FT.ALIAS* commands
501+
// EXPERIMENTAL: this API is subject to change, use with caution.
496502
type AliasBuilder struct {
497503
c *Client
498504
ctx context.Context
@@ -502,6 +508,7 @@ type AliasBuilder struct {
502508
}
503509

504510
// NewAliasBuilder creates a new AliasBuilder for FT.ALIAS* commands.
511+
// EXPERIMENTAL: this API is subject to change, use with caution.
505512
func (c *Client) NewAliasBuilder(ctx context.Context, alias string) *AliasBuilder {
506513
return &AliasBuilder{c: c, ctx: ctx, alias: alias}
507514
}
@@ -551,7 +558,8 @@ func (b *AliasBuilder) Run() (string, error) {
551558
// ----------------------
552559
// ExplainBuilder for FT.EXPLAIN
553560
// ----------------------
554-
561+
// ExplainBuilder is builder for FT.EXPLAIN
562+
// EXPERIMENTAL: this API is subject to change, use with caution.
555563
type ExplainBuilder struct {
556564
c *Client
557565
ctx context.Context
@@ -561,6 +569,7 @@ type ExplainBuilder struct {
561569
}
562570

563571
// NewExplainBuilder creates a new ExplainBuilder for FT.EXPLAIN commands.
572+
// EXPERIMENTAL: this API is subject to change, use with caution.
564573
func (c *Client) NewExplainBuilder(ctx context.Context, index, query string) *ExplainBuilder {
565574
return &ExplainBuilder{c: c, ctx: ctx, index: index, query: query, options: &FTExplainOptions{}}
566575
}
@@ -598,7 +607,8 @@ func (b *FTInfoBuilder) Run() (FTInfoResult, error) {
598607
// ----------------------
599608
// SpellCheckBuilder for FT.SPELLCHECK
600609
// ----------------------
601-
610+
// SpellCheckBuilder is builder for FT.SPELLCHECK
611+
// EXPERIMENTAL: this API is subject to change, use with caution.
602612
type SpellCheckBuilder struct {
603613
c *Client
604614
ctx context.Context
@@ -608,6 +618,7 @@ type SpellCheckBuilder struct {
608618
}
609619

610620
// NewSpellCheckBuilder creates a new SpellCheckBuilder for FT.SPELLCHECK commands.
621+
// EXPERIMENTAL: this API is subject to change, use with caution.
611622
func (c *Client) NewSpellCheckBuilder(ctx context.Context, index, query string) *SpellCheckBuilder {
612623
return &SpellCheckBuilder{c: c, ctx: ctx, index: index, query: query, options: &FTSpellCheckOptions{}}
613624
}
@@ -642,7 +653,8 @@ func (b *SpellCheckBuilder) Run() ([]SpellCheckResult, error) {
642653
// ----------------------
643654
// DictBuilder for FT.DICT* commands
644655
// ----------------------
645-
656+
// DictBuilder is builder for FT.DICT* commands
657+
// EXPERIMENTAL: this API is subject to change, use with caution.
646658
type DictBuilder struct {
647659
c *Client
648660
ctx context.Context
@@ -652,6 +664,7 @@ type DictBuilder struct {
652664
}
653665

654666
// NewDictBuilder creates a new DictBuilder for FT.DICT* commands.
667+
// EXPERIMENTAL: this API is subject to change, use with caution.
655668
func (c *Client) NewDictBuilder(ctx context.Context, dict string) *DictBuilder {
656669
return &DictBuilder{c: c, ctx: ctx, dict: dict}
657670
}
@@ -701,7 +714,8 @@ func (b *DictBuilder) Run() (interface{}, error) {
701714
// ----------------------
702715
// TagValsBuilder for FT.TAGVALS
703716
// ----------------------
704-
717+
// TagValsBuilder is builder for FT.TAGVALS
718+
// EXPERIMENTAL: this API is subject to change, use with caution.
705719
type TagValsBuilder struct {
706720
c *Client
707721
ctx context.Context
@@ -710,6 +724,7 @@ type TagValsBuilder struct {
710724
}
711725

712726
// NewTagValsBuilder creates a new TagValsBuilder for FT.TAGVALS commands.
727+
// EXPERIMENTAL: this API is subject to change, use with caution.
713728
func (c *Client) NewTagValsBuilder(ctx context.Context, index, field string) *TagValsBuilder {
714729
return &TagValsBuilder{c: c, ctx: ctx, index: index, field: field}
715730
}
@@ -723,7 +738,8 @@ func (b *TagValsBuilder) Run() ([]string, error) {
723738
// ----------------------
724739
// CursorBuilder for FT.CURSOR*
725740
// ----------------------
726-
741+
// CursorBuilder is builder for FT.CURSOR* commands
742+
// EXPERIMENTAL: this API is subject to change, use with caution.
727743
type CursorBuilder struct {
728744
c *Client
729745
ctx context.Context
@@ -734,6 +750,7 @@ type CursorBuilder struct {
734750
}
735751

736752
// NewCursorBuilder creates a new CursorBuilder for FT.CURSOR* commands.
753+
// EXPERIMENTAL: this API is subject to change, use with caution.
737754
func (c *Client) NewCursorBuilder(ctx context.Context, index string, cursorId int64) *CursorBuilder {
738755
return &CursorBuilder{c: c, ctx: ctx, index: index, cursorId: cursorId}
739756
}
@@ -775,7 +792,8 @@ func (b *CursorBuilder) Run() (interface{}, error) {
775792
// ----------------------
776793
// SynUpdateBuilder for FT.SYNUPDATE
777794
// ----------------------
778-
795+
// SyncUpdateBuilder is builder for FT.SYNCUPDATE
796+
// EXPERIMENTAL: this API is subject to change, use with caution.
779797
type SynUpdateBuilder struct {
780798
c *Client
781799
ctx context.Context
@@ -786,6 +804,7 @@ type SynUpdateBuilder struct {
786804
}
787805

788806
// NewSynUpdateBuilder creates a new SynUpdateBuilder for FT.SYNUPDATE commands.
807+
// EXPERIMENTAL: this API is subject to change, use with caution.
789808
func (c *Client) NewSynUpdateBuilder(ctx context.Context, index string, groupId interface{}) *SynUpdateBuilder {
790809
return &SynUpdateBuilder{c: c, ctx: ctx, index: index, groupId: groupId, options: &FTSynUpdateOptions{}}
791810
}

0 commit comments

Comments
 (0)