@@ -231,7 +231,6 @@ type FTAggregateApply struct {
231
231
232
232
type FTAggregateLoad struct {
233
233
Field string
234
- As string
235
234
}
236
235
237
236
type FTAggregateWithCursor struct {
@@ -493,9 +492,6 @@ func FTAggregateQuery(query string, options *FTAggregateOptions) AggregateQuery
493
492
queryArgs = append (queryArgs , "LOAD" , len (options .Load ))
494
493
for _ , load := range options .Load {
495
494
queryArgs = append (queryArgs , load .Field )
496
- if load .As != "" {
497
- queryArgs = append (queryArgs , "AS" , load .As )
498
- }
499
495
}
500
496
}
501
497
if options .Timeout > 0 {
@@ -653,8 +649,7 @@ func (cmd *AggregateCmd) String() string {
653
649
func (cmd * AggregateCmd ) readReply (rd * proto.Reader ) (err error ) {
654
650
data , err := rd .ReadSlice ()
655
651
if err != nil {
656
- cmd .err = err
657
- return nil
652
+ return err
658
653
}
659
654
cmd .val , err = ProcessAggregateResult (data )
660
655
if err != nil {
@@ -684,9 +679,6 @@ func (c cmdable) FTAggregateWithArgs(ctx context.Context, index string, query st
684
679
args = append (args , "LOAD" , len (options .Load ))
685
680
for _ , load := range options .Load {
686
681
args = append (args , load .Field )
687
- if load .As != "" {
688
- args = append (args , "AS" , load .As )
689
- }
690
682
}
691
683
}
692
684
if options .Timeout > 0 {
@@ -1473,8 +1465,7 @@ func (cmd *FTSpellCheckCmd) RawResult() (interface{}, error) {
1473
1465
func (cmd * FTSpellCheckCmd ) readReply (rd * proto.Reader ) (err error ) {
1474
1466
data , err := rd .ReadSlice ()
1475
1467
if err != nil {
1476
- cmd .err = err
1477
- return nil
1468
+ return err
1478
1469
}
1479
1470
cmd .val , err = parseFTSpellCheck (data )
1480
1471
if err != nil {
@@ -1662,8 +1653,7 @@ func (cmd *FTSearchCmd) RawResult() (interface{}, error) {
1662
1653
func (cmd * FTSearchCmd ) readReply (rd * proto.Reader ) (err error ) {
1663
1654
data , err := rd .ReadSlice ()
1664
1655
if err != nil {
1665
- cmd .err = err
1666
- return nil
1656
+ return err
1667
1657
}
1668
1658
cmd .val , err = parseFTSearch (data , cmd .options .NoContent , cmd .options .WithScores , cmd .options .WithPayloads , cmd .options .WithSortKeys )
1669
1659
if err != nil {
@@ -1889,7 +1879,7 @@ func (c cmdable) FTSearchWithArgs(ctx context.Context, index string, query strin
1889
1879
}
1890
1880
}
1891
1881
if options .SortByWithCount {
1892
- args = append (args , "WITHCOUT " )
1882
+ args = append (args , "WITHCOUNT " )
1893
1883
}
1894
1884
}
1895
1885
if options .LimitOffset >= 0 && options .Limit > 0 {
0 commit comments