@@ -576,6 +576,8 @@ func FTAggregateQuery(query string, options *FTAggregateOptions) AggregateQuery
576576 }
577577 if options .DialectVersion > 0 {
578578 queryArgs = append (queryArgs , "DIALECT" , options .DialectVersion )
579+ } else {
580+ queryArgs = append (queryArgs , "DIALECT" , 2 )
579581 }
580582 }
581583 return queryArgs
@@ -767,6 +769,8 @@ func (c cmdable) FTAggregateWithArgs(ctx context.Context, index string, query st
767769 }
768770 if options .DialectVersion > 0 {
769771 args = append (args , "DIALECT" , options .DialectVersion )
772+ } else {
773+ args = append (args , "DIALECT" , 2 )
770774 }
771775 }
772776
@@ -1128,6 +1132,8 @@ func (c cmdable) FTExplainWithArgs(ctx context.Context, index string, query stri
11281132 args := []interface {}{"FT.EXPLAIN" , index , query }
11291133 if options .Dialect != "" {
11301134 args = append (args , "DIALECT" , options .Dialect )
1135+ } else {
1136+ args = append (args , "DIALECT" , 2 )
11311137 }
11321138 cmd := NewStringCmd (ctx , args ... )
11331139 _ = c (ctx , cmd )
@@ -1425,6 +1431,8 @@ func (c cmdable) FTSpellCheckWithArgs(ctx context.Context, index string, query s
14251431 }
14261432 if options .Dialect > 0 {
14271433 args = append (args , "DIALECT" , options .Dialect )
1434+ } else {
1435+ args = append (args , "DIALECT" , 2 )
14281436 }
14291437 }
14301438 cmd := newFTSpellCheckCmd (ctx , args ... )
@@ -1789,6 +1797,8 @@ func FTSearchQuery(query string, options *FTSearchOptions) SearchQuery {
17891797 }
17901798 if options .DialectVersion > 0 {
17911799 queryArgs = append (queryArgs , "DIALECT" , options .DialectVersion )
1800+ } else {
1801+ queryArgs = append (queryArgs , "DIALECT" , 2 )
17921802 }
17931803 }
17941804 return queryArgs
@@ -1903,6 +1913,8 @@ func (c cmdable) FTSearchWithArgs(ctx context.Context, index string, query strin
19031913 }
19041914 if options .DialectVersion > 0 {
19051915 args = append (args , "DIALECT" , options .DialectVersion )
1916+ } else {
1917+ args = append (args , "DIALECT" , 2 )
19061918 }
19071919 }
19081920 cmd := newFTSearchCmd (ctx , options , args ... )
0 commit comments