Skip to content

Commit 131aad3

Browse files
authored
Feat rueidiscompat redisearch (#676)
* feat: wip: implement SearchCmdable * feat(RediSearch): wip * feat(RediSearch): wip: fixme: why not impl FTAggregate * feat(RediSearch): wip: FTSpellCheckCmd * feat(RediSearch): wip: FTAggregate * feat: wip: implement SearchCmdable: FTAggregateWithArgs * wip: ft aggregate: reduce * wip: ft aggregate: params * feat: add ADDSCORES option to FT_AGGREGATE command * feat: FT_CREATE: add GEOSHAPE fieldType * wip: FT_EXPLAIN * wip: FT_SEARCH: filter * feat: FT_SEARCH: add WITHCOUNT option * feat: FT_SEARCH * feat(rueidiscompat/SearchCmdable): done * feat(rueidiscompat/SearchCmdable): wip: fix teste * fix(FTSearchCmd): impl FTSearchCmd.from * fix(FTSearchCmd): fix FTSearchWithArgs: geofilter * feat(hack/cmds/commands_search.json): FT.CREATE: add WITHSUFFIXTRIE, INDEXEMPTY, INDEXMISSING options * fix(FTCreateCmd): fix failed tests * feat(hack/cmds/commands_search.json): FT.AGGREGATE: add missing WITHCOUNT option * fix(FTAggregate): fix sortby limit test case * fix(FT.SEARCH): fix tests * refactor(adapter_test.go): add testAdapterSearchRESP2, testAdapterSearchRESP3 and compat-redisearch * fix(FT.SEARCH): add correct impl (array reply) * minor tweaks * fix: FT.INFO, FT.SPELLCHECK * doc(util.go): add liscence * feat(FT.CONFIG_GET): impl * feat(FT.SYNDUMP, FTSYNUPDATE): impl * feat(FT.SEARCH): fix params * fix(FT.SEARCH): fix test: should FTCreate GeoShape * fix(FT.SEARCH): fix test: should search missing fields * fix(testAdapterSearchRESP2): make tests PASS * wip: RESP3 * refactor(pipeline.go): remove unused var * feat(message.go): add IsMap, IsArray helper * feat(FT.SEARCH): fix resp3 tests * fix tests * fix tests * refactor: add docs * refactor: remove unused comment * refactor: remove unused debug log * refactor: remove ginkgo focus * refactor(search_command.json): revert unrelated change * minor tweaks * fix: revert accidentally committed code in RedisResult.ToMap * refactor(util.go): remove unused function * refactor(message.go): remove RedisResult.IsMap, RedisResult.IsArray
1 parent 1c5e799 commit 131aad3

File tree

9 files changed

+4953
-335
lines changed

9 files changed

+4953
-335
lines changed

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ services:
3535
image: redis:5-alpine
3636
ports:
3737
- "6356:6379"
38+
compat-redisearch:
39+
image: redis/redis-stack:7.4.0-v0
40+
ports:
41+
- "6381:6379"
3842
sentinel:
3943
image: redis:7.4-alpine
4044
entrypoint:

hack/cmds/commands_search.json

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@
173173
"TAG",
174174
"NUMERIC",
175175
"GEO",
176-
"VECTOR"
176+
"VECTOR",
177+
"GEOSHAPE"
177178
]
178179
},
179180
{
@@ -182,14 +183,6 @@
182183
"optional": true,
183184
"multiple": true,
184185
"block": [
185-
{
186-
"name": "withsuffixtrie",
187-
"type": "enum",
188-
"enum": [
189-
"WITHSUFFIXTRIE"
190-
],
191-
"optional": true
192-
},
193186
{
194187
"name": "sortable",
195188
"type": "block",
@@ -253,6 +246,30 @@
253246
"enum": [
254247
"CASESENSITIVE"
255248
]
249+
},
250+
{
251+
"name": "WITHSUFFIXTRIE",
252+
"type": "enum",
253+
"optional": true,
254+
"enum": [
255+
"WITHSUFFIXTRIE"
256+
]
257+
},
258+
{
259+
"name": "INDEXEMPTY",
260+
"type": "enum",
261+
"optional": true,
262+
"enum": [
263+
"INDEXEMPTY"
264+
]
265+
},
266+
{
267+
"name": "INDEXMISSING",
268+
"type": "enum",
269+
"optional": true,
270+
"enum": [
271+
"INDEXMISSING"
272+
]
256273
}
257274
]
258275
}
@@ -1092,6 +1109,14 @@
10921109
"ASC",
10931110
"DESC"
10941111
]
1112+
},
1113+
{
1114+
"name": "withcount",
1115+
"type": "enum",
1116+
"optional": true,
1117+
"enum": [
1118+
"WITHCOUNT"
1119+
]
10951120
}
10961121
]
10971122
},
@@ -1315,6 +1340,14 @@
13151340
"type": "integer",
13161341
"command": "MAX",
13171342
"optional": true
1343+
},
1344+
{
1345+
"name": "withcount",
1346+
"type": "enum",
1347+
"enum": [
1348+
"WITHCOUNT"
1349+
],
1350+
"optional": true
13181351
}
13191352
]
13201353
},
@@ -1422,6 +1455,14 @@
14221455
}
14231456
]
14241457
},
1458+
{
1459+
"name": "addscores",
1460+
"type": "enum",
1461+
"enum": [
1462+
"ADDSCORES"
1463+
],
1464+
"optional": true
1465+
},
14251466
{
14261467
"name": "dialect",
14271468
"type": "integer",

0 commit comments

Comments
 (0)