@@ -576,6 +576,8 @@ func FTAggregateQuery(query string, options *FTAggregateOptions) AggregateQuery
576
576
}
577
577
if options .DialectVersion > 0 {
578
578
queryArgs = append (queryArgs , "DIALECT" , options .DialectVersion )
579
+ } else {
580
+ queryArgs = append (queryArgs , "DIALECT" , 2 )
579
581
}
580
582
}
581
583
return queryArgs
@@ -767,6 +769,8 @@ func (c cmdable) FTAggregateWithArgs(ctx context.Context, index string, query st
767
769
}
768
770
if options .DialectVersion > 0 {
769
771
args = append (args , "DIALECT" , options .DialectVersion )
772
+ } else {
773
+ args = append (args , "DIALECT" , 2 )
770
774
}
771
775
}
772
776
@@ -1128,6 +1132,8 @@ func (c cmdable) FTExplainWithArgs(ctx context.Context, index string, query stri
1128
1132
args := []interface {}{"FT.EXPLAIN" , index , query }
1129
1133
if options .Dialect != "" {
1130
1134
args = append (args , "DIALECT" , options .Dialect )
1135
+ } else {
1136
+ args = append (args , "DIALECT" , 2 )
1131
1137
}
1132
1138
cmd := NewStringCmd (ctx , args ... )
1133
1139
_ = c (ctx , cmd )
@@ -1425,6 +1431,8 @@ func (c cmdable) FTSpellCheckWithArgs(ctx context.Context, index string, query s
1425
1431
}
1426
1432
if options .Dialect > 0 {
1427
1433
args = append (args , "DIALECT" , options .Dialect )
1434
+ } else {
1435
+ args = append (args , "DIALECT" , 2 )
1428
1436
}
1429
1437
}
1430
1438
cmd := newFTSpellCheckCmd (ctx , args ... )
@@ -1789,6 +1797,8 @@ func FTSearchQuery(query string, options *FTSearchOptions) SearchQuery {
1789
1797
}
1790
1798
if options .DialectVersion > 0 {
1791
1799
queryArgs = append (queryArgs , "DIALECT" , options .DialectVersion )
1800
+ } else {
1801
+ queryArgs = append (queryArgs , "DIALECT" , 2 )
1792
1802
}
1793
1803
}
1794
1804
return queryArgs
@@ -1903,6 +1913,8 @@ func (c cmdable) FTSearchWithArgs(ctx context.Context, index string, query strin
1903
1913
}
1904
1914
if options .DialectVersion > 0 {
1905
1915
args = append (args , "DIALECT" , options .DialectVersion )
1916
+ } else {
1917
+ args = append (args , "DIALECT" , 2 )
1906
1918
}
1907
1919
}
1908
1920
cmd := newFTSearchCmd (ctx , options , args ... )
0 commit comments