@@ -226,4 +226,121 @@ export const commonfindCurrentArgumentCases = [
226
226
appendIncludes : [ 'TAGS' , 'SUMMARIZE' , 'DIALECT' , 'FILTER' , 'WITHSCORES' , 'INKEYS' ] ,
227
227
appendNotIncludes : [ 'FIELDS' ] ,
228
228
} ,
229
+ {
230
+ input : 'FT.SEARCH index "*" SORTBY price ' ,
231
+ result : expect . any ( Object ) ,
232
+ appendIncludes : [ 'ASC' , 'DESC' , 'FILTER' , 'LIMIT' , 'DIALECT' , 'WITHSCORES' , 'INFIELDS' ] ,
233
+ appendNotIncludes : [ 'SORTBY' ] ,
234
+ } ,
235
+ {
236
+ input : 'FT.SEARCH textVehicles "(-@make:Toyota)" FILTER @year 2021 2022 ' ,
237
+ result : expect . any ( Object ) ,
238
+ appendIncludes : [ 'FILTER' , 'GEOFILTER' , 'TIMEOUT' , 'WITHSORTKEYS' ] ,
239
+ appendNotIncludes : [ 'AS' , 'ASC' ] ,
240
+ } ,
241
+ {
242
+ input : 'FT.SEARCH textVehicles "*" GEOFILTER geo_field lon lat radius ' ,
243
+ result : expect . any ( Object ) ,
244
+ appendIncludes : [ 'ft' , 'km' , 'm' , 'mi' ] ,
245
+ appendNotIncludes : [ 'SORTBY' , 'FILTER' , 'LIMIT' , 'DIALECT' , 'AS' , 'ASC' ] ,
246
+ } ,
247
+ {
248
+ input : 'FT.SEARCH textVehicles "*" RETURN 2 test ' ,
249
+ result : expect . any ( Object ) ,
250
+ appendIncludes : [ 'AS' ] ,
251
+ appendNotIncludes : [ 'SORTBY' , 'FILTER' , 'LIMIT' , 'DIALECT' , 'ASC' ] ,
252
+ } ,
253
+ {
254
+ input : 'FT.CREATE textVehicles ON ' ,
255
+ result : expect . any ( Object ) ,
256
+ appendIncludes : [ 'HASH' , 'JSON' ] ,
257
+ appendNotIncludes : [ 'SORTBY' , 'FILTER' , 'LIMIT' , 'DIALECT' , 'WITHSCORES' , 'INFIELDS' ] ,
258
+ } ,
259
+ {
260
+ input : 'FT.CREATE textVehicles SCHEMA make ' ,
261
+ result : expect . any ( Object ) ,
262
+ appendIncludes : [ 'AS' , 'GEO' , 'NUMERIC' , 'TAG' , 'TEXT' , 'VECTOR' ] ,
263
+ appendNotIncludes : [ 'FILTER' , 'LIMIT' , 'DIALECT' , 'WITHSCORES' , 'INFIELDS' ] ,
264
+ } ,
265
+ {
266
+ input : 'FT.AGGREGATE \'idx:articles\' \'@body:(term) \' APPLY \'test\' ' ,
267
+ result : expect . any ( Object ) ,
268
+ appendIncludes : [ 'AS' ] ,
269
+ appendNotIncludes : [ 'REDUCE' , 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
270
+ } ,
271
+ {
272
+ input : 'FT.AGGREGATE \'idx:articles\' \'@body:(term) \' APPLY \'test\' AS test1' ,
273
+ result : expect . any ( Object ) ,
274
+ appendIncludes : [ 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
275
+ } ,
276
+ {
277
+ input : 'FT.AGGREGATE \'idx:articles\' \'@body:(term) \' LOAD * ' ,
278
+ result : expect . any ( Object ) ,
279
+ appendIncludes : [ 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
280
+ } ,
281
+ {
282
+ input : 'FT.AGGREGATE \'idx:articles\' \'@body:(term) \' SORTBY nargs property ' ,
283
+ result : expect . any ( Object ) ,
284
+ appendIncludes : [ 'ASC' , 'DESC' ] ,
285
+ appendNotIncludes : [ 'REDUCE' , 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
286
+ } ,
287
+ {
288
+ input : 'FT.AGGREGATE \'idx:articles\' \'@body:(term) \' SORTBY nargs property ASC ' ,
289
+ result : expect . any ( Object ) ,
290
+ appendIncludes : [ 'MAX' , 'APPLY' , 'LOAD' , 'GROUPBY' ] ,
291
+ appendNotIncludes : [ 'SORTBY' ] ,
292
+ } ,
293
+ {
294
+ input : 'FT.AGGREGATE \'idx:articles\' \'@body:(term) \' PARAMS 4 name1 value1 name2 value2 ' ,
295
+ result : expect . any ( Object ) ,
296
+ appendIncludes : [ 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
297
+ appendNotIncludes : [ 'PARAMS' , 'REDUCE' ] ,
298
+ } ,
299
+ {
300
+ input : 'FT.ALTER index SCHEMA ADD sdfsd fsdfsd ' ,
301
+ result : expect . any ( Object ) ,
302
+ appendIncludes : [ ] ,
303
+ appendNotIncludes : [ 'SKIPINITIALSCAN' , 'ADD' , 'SCHEMA' ] ,
304
+ } ,
305
+ {
306
+ input : 'FT.DROPINDEX \'vd\' ' ,
307
+ result : expect . any ( Object ) ,
308
+ appendIncludes : [ 'DD' ] ,
309
+ } ,
310
+ {
311
+ input : 'FT.EXPLAIN index query ' ,
312
+ result : expect . any ( Object ) ,
313
+ appendIncludes : [ 'DIALECT' ] ,
314
+ appendNotIncludes : [ 'SKIPINITIALSCAN' , 'ADD' , 'SCHEMA' , 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
315
+ } ,
316
+ {
317
+ input : 'FT.EXPLAINCLI index query ' ,
318
+ result : expect . any ( Object ) ,
319
+ appendIncludes : [ 'DIALECT' ] ,
320
+ appendNotIncludes : [ 'SKIPINITIALSCAN' , 'ADD' , 'SCHEMA' , 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
321
+ } ,
322
+ {
323
+ input : 'FT.INFO index ' ,
324
+ result : expect . any ( Object ) ,
325
+ appendIncludes : [ ] ,
326
+ appendNotIncludes : [ 'ADD' , 'SCHEMA' , 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
327
+ } ,
328
+ {
329
+ input : 'FT.PROFILE \'idx:schools\' ' ,
330
+ result : expect . any ( Object ) ,
331
+ appendIncludes : [ 'AGGREGATE' , 'SEARCH' ] ,
332
+ appendNotIncludes : [ 'LIMITED' ] ,
333
+ } ,
334
+ {
335
+ input : 'FT.SPELLCHECK \'idx:articles\' \'test\' DIALECT dialect DISTANCE distance TERMS ' ,
336
+ result : expect . any ( Object ) ,
337
+ appendIncludes : [ 'EXCLUDE' , 'INCLUDE' ] ,
338
+ appendNotIncludes : [ 'DIALECT' , 'DISTANCE' , 'TERMS' ] ,
339
+ } ,
340
+ {
341
+ input : 'FT.SYNUPDATE \'idx:products\' synonym_group_id ' ,
342
+ result : expect . any ( Object ) ,
343
+ appendIncludes : [ 'SKIPINITIALSCAN' ] ,
344
+ appendNotIncludes : [ 'DIALECT' , 'DISTANCE' , 'TERMS' , 'INCLUDE' , 'SCHEMA' , 'APPLY' , 'LOAD' , 'SORTBY' , 'GROUPBY' ] ,
345
+ } ,
229
346
]
0 commit comments