Skip to content

Commit

Permalink
Feat rueidiscompat redisearch (#676)
Browse files Browse the repository at this point in the history
* 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

Signed-off-by: Rueian <[email protected]>
  • Loading branch information
unknowntpo authored and rueian committed Nov 26, 2024
1 parent f314e7d commit 788fdea
Show file tree
Hide file tree
Showing 9 changed files with 4,953 additions and 335 deletions.
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ services:
image: redis:5-alpine
ports:
- "6356:6379"
compat-redisearch:
image: redis/redis-stack:7.4.0-v0
ports:
- "6381:6379"
sentinel:
image: valkey/valkey:8.0-alpine
entrypoint:
Expand Down
59 changes: 50 additions & 9 deletions hack/cmds/commands_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@
"TAG",
"NUMERIC",
"GEO",
"VECTOR"
"VECTOR",
"GEOSHAPE"
]
},
{
Expand All @@ -182,14 +183,6 @@
"optional": true,
"multiple": true,
"block": [
{
"name": "withsuffixtrie",
"type": "enum",
"enum": [
"WITHSUFFIXTRIE"
],
"optional": true
},
{
"name": "sortable",
"type": "block",
Expand Down Expand Up @@ -253,6 +246,30 @@
"enum": [
"CASESENSITIVE"
]
},
{
"name": "WITHSUFFIXTRIE",
"type": "enum",
"optional": true,
"enum": [
"WITHSUFFIXTRIE"
]
},
{
"name": "INDEXEMPTY",
"type": "enum",
"optional": true,
"enum": [
"INDEXEMPTY"
]
},
{
"name": "INDEXMISSING",
"type": "enum",
"optional": true,
"enum": [
"INDEXMISSING"
]
}
]
}
Expand Down Expand Up @@ -1092,6 +1109,14 @@
"ASC",
"DESC"
]
},
{
"name": "withcount",
"type": "enum",
"optional": true,
"enum": [
"WITHCOUNT"
]
}
]
},
Expand Down Expand Up @@ -1315,6 +1340,14 @@
"type": "integer",
"command": "MAX",
"optional": true
},
{
"name": "withcount",
"type": "enum",
"enum": [
"WITHCOUNT"
],
"optional": true
}
]
},
Expand Down Expand Up @@ -1422,6 +1455,14 @@
}
]
},
{
"name": "addscores",
"type": "enum",
"enum": [
"ADDSCORES"
],
"optional": true
},
{
"name": "dialect",
"type": "integer",
Expand Down
Loading

0 comments on commit 788fdea

Please sign in to comment.