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
[BUG] Redis Search silently fails to Sort when the index schema is too large #4494
Comments
Hi @claridgicus, thanks for reaching out!
Did you change any config params? |
Hey @raz-mon I'm using RedisLabs and I've tried two different nodes Save and BgSave are unavailable in Redislabs, but I can provide you creds if you can provide me a way to send them to you (to my non production node) My 7.2 Test Node My Main Production Node I have attempted a version with the maxtextfields option - but that doesn't help me either (documentation on that feature could also be slightly improved) here's my query - nothing too hairy the outputted sort order of the query on a broken index is
if I give the undefined entries a number say '999' they will still appear out of order in the results the output on a non broken index is
here's my big boy "index info" I've tried removing "-", removing any entry in the sort that contains a number in it, creating a base index without the sort fields and altering to add all my sorts How I currently have it working, whenever I exceed 250 sorts it breaks, so I'm degrading the feature set of my app to provide the sort functionality to the key groups my client requires - without going back to what I was doing, (one index per sort order - which results in a memory usage many times what I can justify for a client)
|
I can probably spin up a local node and provide a dump if providing the creds is too hard. |
Hi @claridgicus, Let me make sure I understand you correctly - what you refer to as "sorts" are fields of your index that you may use to sort the results of a query, correct? And when you have more then Can you provide a dump.rdb file or a script that reproduces this issue? Whatever is more comfortable for you. If you go for the rdb, please state the used versions as well as the queries you run showing the unsuccessful sort. Thanks |
@raz-mon I will try to get you a dump tomorrow. A bit of clarification - I've debugged my way through my application to find the issue occurs when the index hits 256 sortable fields (exact number) regardless of type. When the index exceeds the 256 - all the sorts stop working. It does work when I alter the index below the 256 limit, so by just arbitrarily removing some sorts from my index it will resume working normally - so a "broken" index can be altered into a working index. |
Sorry I have had a mega couple of weeks, I will see about that dump this week |
This issue is stale because it has been open for 60 days with no activity. |
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
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:
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.
The text was updated successfully, but these errors were encountered: