Skip to content

Conversation

petyaslavova
Copy link
Collaborator

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Fixes #3809

@petyaslavova petyaslavova added the maintenance Maintenance (CI, Releases, etc) label Oct 21, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the ordering of RediSearch field attributes in index creation commands. The SORTABLE attribute must appear after INDEXEMPTY and INDEXMISSING to comply with RediSearch's expected command syntax.

Key Changes:

  • Reordered field attribute appending logic to place SORTABLE after INDEXEMPTY and INDEXMISSING
  • Added test coverage for the fixed behavior in both sync and async test suites

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
redis/commands/search/field.py Moved SORTABLE attribute to be appended after INDEXEMPTY and INDEXMISSING in the Field constructor
tests/test_search.py Added test case verifying index creation with SORTABLE combined with INDEXEMPTY and INDEXMISSING
tests/test_asyncio/test_search.py Added async version of the test case for index creation with combined attributes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@petyaslavova petyaslavova merged commit 20bdf4d into master Oct 22, 2025
103 of 106 checks passed
@petyaslavova petyaslavova deleted the ps_fix_sortable_index_missing_order_in_tag_init branch October 22, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance (CI, Releases, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect argument order for RediSearch field flags (INDEXMISSING / INDEXEMPTY with SORTABLE)

2 participants