-
Notifications
You must be signed in to change notification settings - Fork 573
Description
Describe the bug
I am running a redissearch instance to curate product information for many merchants
Merchants divvy up their products into user-friendly "categories" which typically contain their own unique sort order.
I have loaded in the merchants' products using prefix keys to partition them from each other
I create a "Category" index, which contains useful information for a customer to interact with, price, tags, title etc and also includes a reference to a nested JSON object "sortOrder"
My index looks a bit like this
'$.title': {
type: SchemaFieldTypes.TEXT,
SORTABLE: true,
AS: 'title',
},
'$.tags': {
type: SchemaFieldTypes.TAG,
AS: 'tags',
},
"$['sortOrder']['example1']": {
type: SchemaFieldTypes.NUMERIC,
SORTABLE: true,
AS: 'example1'
} << I might have 2-600 of these for a given store
When an index exceeds 250 sort definitions (which if you ask redis to create an index it will successfully create one without error or warning) querying for the index with an appropriate SortBy will result in out-of-order objects.
To Reproduce
Steps to reproduce the behaviour:
- Load in a couple of thousand product objects
- Define an arbitrary numeric sort for them in a child property
- Create an index that has 250 unique sorts
- Query for products, with "SortBy" set to be one of your unique sorts
Expected behaviour
This should still work, albeit slowly - or the index should fail to create in the first instance
I can provide access to a redis instance over DM to someone to debug an actual dataset if required.