Skip to content

Commit c9f8cbc

Browse files
authored
chore: mark 8.4 features as experimental (#3134)
1 parent f8841c8 commit c9f8cbc

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

packages/client/lib/commands/DELEX.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ type DelexCondition = (typeof DelexCondition)[keyof typeof DelexCondition];
2525
export default {
2626
IS_READ_ONLY: false,
2727
/**
28+
*
29+
* @experimental
30+
*
2831
* Conditionally removes the specified key based on value or digest comparison.
2932
*
3033
* @param parser - The Redis command parser

packages/client/lib/commands/DIGEST.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { Command, RedisArgument, SimpleStringReply } from "../RESP/types";
44
export default {
55
IS_READ_ONLY: true,
66
/**
7+
*
8+
* @experimental
9+
*
710
* Returns the XXH3 hash of a string value.
811
*
912
* @param parser - The Redis command parser

packages/client/lib/commands/SET.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export interface SetOptions {
3333
* Condition for setting the key:
3434
* - `NX` - Set if key does not exist
3535
* - `XX` - Set if key already exists
36+
*
37+
* @experimental
38+
*
3639
* - `IFEQ` - Set if current value equals match-value (since 8.4, requires `matchValue`)
3740
* - `IFNE` - Set if current value does not equal match-value (since 8.4, requires `matchValue`)
3841
* - `IFDEQ` - Set if current value digest equals match-digest (since 8.4, requires `matchValue`)
@@ -53,14 +56,14 @@ export interface SetOptions {
5356
* @deprecated Use `{ condition: 'XX' }` instead.
5457
*/
5558
XX?: boolean;
56-
59+
5760
GET?: boolean;
5861
}
5962

6063
export default {
6164
/**
6265
* Constructs the SET command
63-
*
66+
*
6467
* @param parser - The command parser
6568
* @param key - The key to set
6669
* @param value - The value to set

packages/search/lib/commands/HYBRID.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ function parseVectorExpression(parser: CommandParser, vsim: FtHybridVectorExpres
116116
if (vsim.method.KNN) {
117117
const knn = vsim.method.KNN;
118118
parser.push('KNN', '1', 'K', knn.K.toString());
119-
119+
120120
if (knn.EF_RUNTIME !== undefined) {
121121
parser.push('EF_RUNTIME', knn.EF_RUNTIME.toString());
122122
}
123-
123+
124124
if (knn.YIELD_DISTANCE_AS) {
125125
parser.push('YIELD_DISTANCE_AS', knn.YIELD_DISTANCE_AS);
126126
}
@@ -129,11 +129,11 @@ function parseVectorExpression(parser: CommandParser, vsim: FtHybridVectorExpres
129129
if (vsim.method.RANGE) {
130130
const range = vsim.method.RANGE;
131131
parser.push('RANGE', '1', 'RADIUS', range.RADIUS.toString());
132-
132+
133133
if (range.EPSILON !== undefined) {
134134
parser.push('EPSILON', range.EPSILON.toString());
135135
}
136-
136+
137137
if (range.YIELD_DISTANCE_AS) {
138138
parser.push('YIELD_DISTANCE_AS', range.YIELD_DISTANCE_AS);
139139
}
@@ -142,10 +142,10 @@ function parseVectorExpression(parser: CommandParser, vsim: FtHybridVectorExpres
142142

143143
if (vsim.FILTER) {
144144
parser.push('FILTER', vsim.FILTER.expression);
145-
145+
146146
if (vsim.FILTER.POLICY) {
147147
parser.push('POLICY', vsim.FILTER.POLICY);
148-
148+
149149
if (vsim.FILTER.POLICY === 'BATCHES' && vsim.FILTER.BATCHES) {
150150
parser.push('BATCHES', 'BATCH_SIZE', vsim.FILTER.BATCHES.BATCH_SIZE.toString());
151151
}
@@ -165,11 +165,11 @@ function parseCombineMethod(parser: CommandParser, combine: FtHybridOptions['COM
165165
if (combine.method.RRF) {
166166
const rrf = combine.method.RRF;
167167
parser.push('RRF', rrf.count.toString());
168-
168+
169169
if (rrf.WINDOW !== undefined) {
170170
parser.push('WINDOW', rrf.WINDOW.toString());
171171
}
172-
172+
173173
if (rrf.CONSTANT !== undefined) {
174174
parser.push('CONSTANT', rrf.CONSTANT.toString());
175175
}
@@ -178,11 +178,11 @@ function parseCombineMethod(parser: CommandParser, combine: FtHybridOptions['COM
178178
if (combine.method.LINEAR) {
179179
const linear = combine.method.LINEAR;
180180
parser.push('LINEAR', linear.count.toString());
181-
181+
182182
if (linear.ALPHA !== undefined) {
183183
parser.push('ALPHA', linear.ALPHA.toString());
184184
}
185-
185+
186186
if (linear.BETA !== undefined) {
187187
parser.push('BETA', linear.BETA.toString());
188188
}
@@ -216,7 +216,7 @@ function parseHybridOptions(parser: CommandParser, options?: FtHybridOptions) {
216216

217217
if (options.GROUPBY) {
218218
parseOptionalVariadicArgument(parser, 'GROUPBY', options.GROUPBY.fields);
219-
219+
220220
if (options.GROUPBY.REDUCE) {
221221
parser.push('REDUCE', options.GROUPBY.REDUCE.function, options.GROUPBY.REDUCE.count.toString());
222222
parser.push(...options.GROUPBY.REDUCE.args);
@@ -257,11 +257,11 @@ function parseHybridOptions(parser: CommandParser, options?: FtHybridOptions) {
257257

258258
if (options.WITHCURSOR) {
259259
parser.push('WITHCURSOR');
260-
260+
261261
if (options.WITHCURSOR.COUNT !== undefined) {
262262
parser.push('COUNT', options.WITHCURSOR.COUNT.toString());
263263
}
264-
264+
265265
if (options.WITHCURSOR.MAXIDLE !== undefined) {
266266
parser.push('MAXIDLE', options.WITHCURSOR.MAXIDLE.toString());
267267
}
@@ -274,10 +274,11 @@ export default {
274274
/**
275275
* Performs a hybrid search combining multiple search expressions.
276276
* Supports multiple SEARCH and VECTOR expressions with various fusion methods.
277-
*
277+
*
278+
* @experimental
278279
* NOTE: FT.Hybrid is still in experimental state
279-
* It's behavioud and function signature may change`
280-
*
280+
* It's behaviour and function signature may change
281+
*
281282
* @param parser - The command parser
282283
* @param index - The index name to search
283284
* @param options - Hybrid search options including:
@@ -300,7 +301,7 @@ export default {
300301
// This is a cursor reply
301302
const [searchResults, cursor] = reply;
302303
const transformedResults = transformHybridSearchResults(searchResults);
303-
304+
304305
return {
305306
...transformedResults,
306307
cursor
@@ -345,7 +346,7 @@ function documentValue(tuples: any) {
345346
while (i < tuples.length) {
346347
const key = tuples[i++];
347348
const value = tuples[i++];
348-
349+
349350
if (key === '$') { // might be a JSON reply
350351
try {
351352
Object.assign(message, JSON.parse(value));

0 commit comments

Comments
 (0)