Basic Sorting

Having the following data


449201209630000



449206349620000



449201584740000

//SerialNo sortby (. desc)
Should this query work??
Actualy it looks as if does not really matter what do i write inside the brackets, it doesn’t sort the results.
I am working with 2.3.1.4 and 2.2.1.9, diferent mappings and data types… same results, so i believe i am missing some obvious point.

Thanks.

I believe you perform intra-document sort (sort nodes within a document). You have one SerialNo element per Item element. That is why Tamino does not sort anything.

To sort documents you should use sort clause immediately after a root node.

I think this one will work

Item sortby (SerialNo)/SerialNo

By the way, why do all the documents have the same ino:id?

Good Luck

The ino:id’s are the same just becouse i copied one item several times in the post. Lets use a diferent set of data i am using fot testing porpouses.


1111111111
2222222222

-
2222222222
4444444444

-
3333333333
1111111111

-
4444444444
5555555555

-
5555555555
3333333333


How should i query those documents to get them shorted out?
Thanks.

Now it works.
Something was missing in my previous tests.

Having Data2 as standar seach type the following intra-document sorting works properly.

SortingTest1 sortby(./Data2)