RedisDb.keyword_search takes a limit. It built its TextQuery without num_results, so redisvl applied its own default of 10, whatever the caller asked for.
The right answer from the wrong mechanism
Nobody noticed because two defaults collide. Knowledge.max_results is 10, and redisvl's num_results is 10 as well. On the stock path you ask for 10 and you get 10. Move max_results and it breaks both ways, with no exception and no log: ask for 50, get 10; ask for 3, get 10.
text_query = TextQuery(
text=query,
text_field_name="content",
+ num_results=limit,
filter_expression=filter_expression,
)The file already knew
vector_search and hybrid_search in the same file both pass num_results=limit. Even the bulk reads write num_results=1000 with a comment saying why. Redis was the only one of the 8 keyword_search implementations under vectordb/ to drop it.
Why the old test could not see it
The existing test told its mock to return one row, then checked that one row came back. It proved the mock, not the adapter. The new test asserts on what the adapter asked redisvl for. Its one weakness is named in the pull request: it reads a private attribute, because redisvl exposes no public one.
A community reviewer then rebuilt the query by hand and read the generated arguments: LIMIT 0 10 without the fix, LIMIT 0 3 with it. They also flagged a visible effect: the default keyword search now returns 5, like its three sibling methods already did.
What I take from it
When two defaults happen to agree, a bug can pass every test that uses them. Change one number on purpose before you trust the green.
Ayoub Hammoudi, Software engineer, full-stack and AI platforms. github.com/Ayoubhm07


