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

FT.CREATE with both SORTABLE and INDEXMISSING fails #404

Closed
JohnTheGray opened this issue Mar 27, 2025 · 1 comment · Fixed by #405
Closed

FT.CREATE with both SORTABLE and INDEXMISSING fails #404

JohnTheGray opened this issue Mar 27, 2025 · 1 comment · Fixed by #405
Assignees
Labels
bug Something isn't working

Comments

@JohnTheGray
Copy link

JohnTheGray commented Mar 27, 2025

Redis Version: 7.4.2
Search: 2.10.12
ReJSON: 2.8.8
NRedisStack version: 0.13.2

Creating a schema for a numeric (and text) field with both missingIndex and sortable set to true fails with "Field INDEXMISSING does not have a type":

schema.AddNumericField(new FieldName("test", "test"), missingIndex: true, sortable: true);

This raw query fails the same way:

FT.CREATE idx:test ON JSON PREFIX 1 test: SCHEMA "$.test" AS test NUMERIC SORTABLE INDEXMISSING

It appears that INDEXMISSING must come before SORTABLE since the following works:

FT.CREATE idx:test ON JSON PREFIX 1 test: SCHEMA "$.test" AS test NUMERIC INDEXMISSING SORTABLE

The AddFieldTypeArgs in Schema.cs should be updated to add INDEXMISSING first.

@atakavci atakavci pinned this issue Mar 28, 2025
@atakavci atakavci unpinned this issue Mar 28, 2025
@atakavci
Copy link
Collaborator

Hi @JohnTheGray , thanks for reporting the issue.
i see explanation is clear enough to bring a fix on it. i ll work on this next week.

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 a pull request may close this issue.

2 participants