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.Aggregate with APPLY - text fields data is returing in lowercase if we do the multi column sort #296
Comments
Hi @balasahebr92, so this is a RediSearch thing, NRedisStack is just responding with the answer that It's that normalized value that the There's a couple ways you can override this behavior:
hopefully this helps! |
Hi slorello89, thanks for help! If I use this command ( FT.AGGREGATE test * SORTBY 2 @name ASC LOAD * ) by taking LOAD after the sortby its looks good up to page no 3 but after for page no 4, 5, 6 its returning the previous page records. am taking load * becuase for payload, properties are dyanamically created for every scehma. Examples - scenarion 1
Examples - scenarion 2 Add the UNF as a true while creating the index still its display the text fields in lowecase for this example - its showing the correct records but the text fields showing in lowercase again. Examples - scenarion 3 FT.AGGREGATE indexname * LOAD 8 manufacturer_desc fiscal_week_desc sales_ty sales_ly sortassist manufacturer_id week_id week_enddate SORTBY 4 @manufacturer_desc ASC @sortassist ASC LIMIT 1 10 for this scenarios its looks good can we use the load by mension properties / load * - before the SORTBY, it will not impact sortyby for decimal values / any performance issue ? Please help on this. |
Hi @balasahebr92 - I'm not able to reproduce either of these issues on my end. Not scenario 1 where you get duplicate pages, not scenario 2 where the UNF does not seem to apply. For scenario 1, I'd ensure that the index is in the state you think it is before querying it. For scenario 2 my shot in the dark guess is that you did not drop and recreate the index between runs I created a gist with some example code so you can see what I'm talking about (this uses UNF and works). |
Hi slorello89, thanks for help! Still am not clear the thing Example - lets I have the 100K+ records and I need to retrieve the data by page size 10 every time but sometime like ( 20, 50, 100 pagesize) so what type of query you suggest for best performance point of view Query 1 FT.AGGREGATE indexname* LOAD * SORTBY 4 @Column1 DESC @column2 DESC LIMIT 1 10 Query 2 Query 3 Query 4 FT.AGGREGATE indexname* SORTBY 4 @Column1 DESC @column2 DESC LOAD 5 column1 column2 column3 column4 column5 LIMIT 1 10 |
Hi slorello89 As per above scenarios am using the Query 2 it's working for me as per my expectation but if I use the load after the SORTBY - for text fields its return the data in lowercase even if I declare this text column as UNF while creating the index. thank you very much! |
Hi @balasahebr92 - as I mentioned, you need to use the |
Hi slorello89 thanks for help. am closing this issue now from my side |
Thanks for reporting an issue in NRedisStack! Please update the appropriate text below, as much data as possible really helps!
NRedisStack Version:0.12.0
Redis Stack Version:
Description:
I am facing the issue with multi column sort - the text fields data am getting in lowercase, i need this values what i stored. the values will be stored as in capital / pascalcase / camelcase but all values am getting in the lowercase. I have did some observation on this please look into this
FT.Aggreagate & FT.Search Commands
FT.Search -
Its support the single column sorting
If I have decimal fields & its type as numeric with set sortable true then, sorting for this column not doing perfect.
Example - FT.Search indexname "*" SORTBY sales_ty ASC;
FT.Search command not support for multi column sorting
2. FT.AGGREGATE with LOAD
Its support the multi column sort for text & numeric fields is working as expected
but if I have the field like (sales - 23435.3446 ) in that case its not working as expected
Example - FT.AGGREGATE indexname * LOAD * SORTBY 6 @manufacturer_desc DESC @units_ty DESC @sortassist DESC LIMIT 0 40;
3. FT.AGGREGATE with APPLY
Its support the multi column sort for text & numeric fields is working as expected.
For numeric field like (2364 or 3435.345), its also working as expected
But issue is for string/text sortable fields - where its return the data in lowercase
Example - FT.AGGREGATE indexname * SORTBY 6 @manufacturer_desc DESC @units_ty DESC @sortassist DESC APPLY @manufacturer_id AS manufacturer_id APPLY @manufacturer_desc AS manufacturer_desc APPLY @week_id AS week_id APPLY @week_enddate AS week_enddate APPLY @units_ly AS units_ly APPLY @fiscal_week_desc AS fiscal_week_desc APPLY @units_ty AS units_ty APPLY @sortassist AS sortassist LIMIT 0 40
Stored Result
Sorting Result
Please help on this ASAP
The text was updated successfully, but these errors were encountered: