Skip to content

Commit 75f19ff

Browse files
Added support for SLOP. Changed the int to a pointer (nullable) because SLOP 0 is a valid activity. (#97)
Co-authored-by: filipe oliveira <[email protected]>
1 parent f79df23 commit 75f19ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

redisearch/query.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ type Query struct {
7979

8080
Paging Paging
8181
Flags Flag
82-
Slop int
82+
Slop *int
8383

8484
Filters []Filter
8585
InKeys []string
@@ -139,6 +139,10 @@ func (q Query) serialize() redis.Args {
139139
args = args.Add("NOCONTENT")
140140
}
141141

142+
if q.Slop != nil {
143+
args = args.Add("SLOP", *q.Slop)
144+
}
145+
142146
if q.Flags&QueryInOrder != 0 {
143147
args = args.Add("INORDER")
144148
}

0 commit comments

Comments
 (0)