cancel
Showing results for 
Search instead for 
Did you mean: 

Natural sort algorithm

rogelio_basurto
Node Link

Hi everyone

I have a lot of text nodes and I am traying to create an API that return the data sorted in natural order.
The data looks like this:
"Article 1", "Article 2", "Article 3",...,"Article 10",...,"Article 100"
And With ORDER BY and apoc.coll.sort* the result is like the following:
"Article 1",
"Article 10"
"Article 100"
"Article 2",
"Article 200"
"Article 3",

I want the natural order, the one people understands. I know I can retrieve all the information and sort it in my API, but that is not that efficient, I would like to know if there is a solution inside Neo4j.

The kind of sort that I am aiming to do, is like the one Python Natsort has (link here).

0 REPLIES 0