feat(php): Add Core Valkey Search commands#171
Open
edlng wants to merge 1 commit intovalkey-io:mainfrom
Open
Conversation
6 tasks
Signed-off-by: Edward Liang <edward.liang@improving.com>
50bd58e to
dfe5ec0
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(php): add Valkey Search commands (ftCreate, ftDropIndex, ftList, ftSearch, ftInfo, ftAggregate, ftAliasAdd, ftAliasDel, ftAliasUpdate, ftAliasList)
Summary
Adds FT.* commands for Valkey Search across both standalone (ValkeyGlide) and cluster (ValkeyGlideCluster) clients.
This is the first of two PRs splitting the original valkey-search branch. The CI changes (Docker-based server startup for the Search module) follow in a separate PR.
Issue link
Closes #163
Features / Behaviour Changes
ftCreate— create a search index with schema definition and options (ON, PREFIX, SCORE, LANGUAGE, vector fields, etc.)ftDropIndex— drop an existing indexftList— list all indexesftSearch— run a search query with options (RETURN, PARAMS, SORTBY, LIMIT, NOCONTENT, shard/consistency flags)ftInfo— get index metadata with optional scope (LOCAL, PRIMARY, CLUSTER) and shard flagsftAggregate— run an aggregation pipeline (GROUPBY, REDUCE, SORTBY, APPLY, FILTER, LIMIT, LOAD, PARAMS, DIALECT)ftAliasAdd— add an alias to an indexftAliasDel— remove an aliasftAliasUpdate— point an alias at a different indexftAliasList— list all alias-to-index mappingsImplementation
Follows the existing command pattern in the repo:
valkey_glide.stub.phpandvalkey_glide_cluster.stub.phpvalkey_glide_ft_common.c/.hvalkey_glide_ft_commands.cvalkey_z_php_methods.c(standalone) andvalkey_glide_cluster.c(cluster)config.m4andpackage.xmlLimitations
testFtAliasOperations) is currently skipped — valkey-search 1.2 images don't support FT.ALIASADD yet. Will re-enable once newer images are available.testFtAggregateBicycles) is also skipped due to query syntax differences in valkey-search 1.2. Same plan.Testing
Integration tests in
tests/ValkeyGlideValkeySearchTest.phpcovering:Checklist
Before submitting the PR make sure the following are checked: