Skip to content
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

Fix index creation issue when multiple options are used with fields #405

Merged
merged 3 commits into from
Apr 3, 2025

Conversation

atakavci
Copy link
Collaborator

@atakavci atakavci commented Apr 2, 2025

Fixes/Closes #404

- add missing xml doc for parameters
@atakavci atakavci self-assigned this Apr 2, 2025
@atakavci atakavci added the bug Something isn't working label Apr 2, 2025
Copy link

@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 addresses the index creation issue that occurs when multiple options are used with field definitions. The changes reposition the "SORTABLE" flag in the search tests and schema construction while adding tests to validate the updated behavior.

  • Adjust the ordering of command arguments by moving the "SORTABLE" option in the schema and search command builder.
  • Introduce new tests in IndexCreationTests to verify behavior when missing, empty, and sortable fields are involved.
  • Update XML documentation comments for field creation methods to include details on missing and empty index options.

Reviewed Changes

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

File Description
tests/NRedisStack.Tests/Search/SearchTests.cs Reordering of the "SORTABLE" option in field commands
tests/NRedisStack.Tests/Search/IndexCreationTests.cs New tests added to verify index creation with missing/empty/sortable fields
src/NRedisStack/Search/Schema.cs Adjusted ordering of options (SORTABLE, INDEXMISSING, INDEXEMPTY) and updated XML docs

Copy link
Member

@slorello89 slorello89 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@atakavci atakavci merged commit 2481084 into redis:master Apr 3, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FT.CREATE with both SORTABLE and INDEXMISSING fails
2 participants