Skip to content

Commit 7df8ec4

Browse files
ofekshenawandyakov
andcommitted
Add integration tests for Redis 8 behavior changes in Redis Search (#3337)
* Add integration tests for Redis 8 behavior changes in Redis Search * Undo changes in ft.search limit * Fix BM25 as the default scorer test * Add more tests and comments on deprecated params * Update search_commands.go * Remove deprication comment for nostopwords --------- Co-authored-by: Nedyalko Dyakov <[email protected]>
1 parent 3bc85d8 commit 7df8ec4

File tree

2 files changed

+485
-4
lines changed

2 files changed

+485
-4
lines changed

search_commands.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ type SpellCheckTerms struct {
114114
}
115115

116116
type FTExplainOptions struct {
117+
// Dialect 1,3 and 4 are deprecated since redis 8.0
117118
Dialect string
118119
}
119120

@@ -261,7 +262,8 @@ type FTAggregateOptions struct {
261262
WithCursor bool
262263
WithCursorOptions *FTAggregateWithCursor
263264
Params map[string]interface{}
264-
DialectVersion int
265+
// Dialect 1,3 and 4 are deprecated since redis 8.0
266+
DialectVersion int
265267
}
266268

267269
type FTSearchFilter struct {
@@ -322,8 +324,9 @@ type FTSearchOptions struct {
322324
Limit int
323325
// CountOnly sets LIMIT 0 0 to get the count - number of documents in the result set without actually returning the result set.
324326
// When using this option, the Limit and LimitOffset options are ignored.
325-
CountOnly bool
326-
Params map[string]interface{}
327+
CountOnly bool
328+
Params map[string]interface{}
329+
// Dialect 1,3 and 4 are deprecated since redis 8.0
327330
DialectVersion int
328331
}
329332

@@ -440,7 +443,8 @@ type IndexDefinition struct {
440443
type FTSpellCheckOptions struct {
441444
Distance int
442445
Terms *FTSpellCheckTerms
443-
Dialect int
446+
// Dialect 1,3 and 4 are deprecated since redis 8.0
447+
Dialect int
444448
}
445449

446450
type FTSpellCheckTerms struct {

0 commit comments

Comments
 (0)