Skip to content

fix(store): honor limit parameter in Redis search operations (#30) #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

bsbodden
Copy link
Contributor

The RedisStore and AsyncRedisStore search methods were hardcoded to return at most 10 results regardless of the specified limit parameter. This fix properly respects the
user-specified limit when searching, enabling retrieval of more than 10 results when needed.

  • Modified _get_batch_search_queries to return limit and offset values
  • Updated search query creation to use Query.paging() method with the user-specified limit
  • Added integration tests to verify fix in both sync and async implementations

@bsbodden bsbodden self-assigned this Apr 30, 2025
Copy link

@rbs333 rbs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@tylerhutcherson tylerhutcherson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Include in the 0.0.5 release?

  The RedisStore and AsyncRedisStore search methods were hardcoded to return at most 10 results regardless of the specified limit parameter. This fix properly respects the
  user-specified limit when searching, enabling retrieval of more than 10 results when needed.

  - Modified _get_batch_search_queries to return limit and offset values
  - Updated search query creation to use Query.paging() method with the user-specified limit
  - Added integration tests to verify fix in both sync and async implementations
@bsbodden bsbodden merged commit 323a485 into main Apr 30, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants