Skip to content

FT.CREATE with both SORTABLE and INDEXMISSING fails #404

Description

@JohnTheGray

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.

Activity

  1. pinned this issue on Mar 28, 2025
  2. unpinned this issue on Mar 28, 2025
  3. atakavci commented on Mar 28, 2025

    @atakavci
    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.

  4. self-assigned this
    on Apr 2, 2025
  5. added theissue type on Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions