Problem with sorting instruction

Hi Folks,

I’ve got a strange problem with sorting operations.
Have a look…
When I make this query : pvText[@pvLanguage=‘FR’ and @type=‘STANDARD’ and @work=‘true’] sortby(@symbolicName)
The result is not correctly sorted.

But, when I change the pvLanguage parameter of my query with another value, let say IT, the result is good.

symbolicName has type xs:string, storage type native and index standard

Any suggestion ?

Could you check your Schema def. so if your query try’ing to sort on a element have more than one occurance then if your xpath is a node has these occurances , sort is not logical.

for example



xpath /a and sort by c then at the first a ; c has 1 and 9 firt businessdocument is the biggest and lowest value for c.


But I don’t understand your answer

Could you sent your tsd and xml data to test it


I can’t send you data you requested.

In fact, we need to sort a selection (based on an attribute) on an other attribute and following the parameter, the order is different.