#1573 - Database natural sorting

Identifier #1573
Issue type Feature request or suggestion
Title Database natural sorting
Status Open
Tags

Type: Cross-cutting feature (custom)

Handling member Deleted
Addon core
Description Data comes out in string order, not natural order. This is throughout Composr, but also pretty much any webapp.
Unfortunately MySQL does not even support natural ordering natively, so there's no easy fix.

A workaround would be to do an ORDER BY such that any numbers are padded out to say 30 characters. E.g. 123 becomes 000000000000000000000000000123. This effectively normalises it.

A big downside is this would break the ability for MySQL to use an index when paginating, so would work very poorly on large amounts of data.

A better approach is to have a custom field automatically maintained, containing these normalised values, probably filled in via a CRON maintenance script.
Steps to reproduce

Related to

#3848 - Metaphonic search indexing

#3288 - Major overhaul of fulltext search support, the "Composr fast custom index"

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated