Order By does not work on rt_field - should it?

Hi

I’m using v5.0.2 (but have also tried on v6.2.12) on Windows. RT index. I was trying to use ORDER BY on an rt_field to sort my results, but it does not seem to work on an indexed field. Maybe I have made an assumption that it should as v5 and later retain the original text. Order by works fine on non-indexed attribute fields.

Is it possible to use order by against an rt_field?

For example my index stores the original filename of the document as

rt_field = org_filename

and I run a simple query SELECT id, org_filename FROM rt_index ORDER BY org_filename ASC;

the results are not ordered at all - they are returned in whatever order the index uses as default

thanks

It’s not possible to sort by a full-text field. You can make the field a string attribute at the same time to be able to sort by it:

    rt_field = org_filename
    rt_attr_string = org_filename
1 Like

Don’t remember why (possibly just to help get it straight in my head), made this…

1 Like