I have a question about sorting documents in Tamino. Sorting by a single node works OK. But if I need to specify a criterion to choose a node for sorting…
And now I need to query all the documents and sort them by prioprity of type B.
I think the query string should look like this
document sortby (priority[@type=“B”])
The grammar for X-Query permits such a query. But Tamino internal error occurs (INOXIE8357).
Does it mean that this version of Tamino (220.127.116.11) cannot help me here?
Thanks for answers in advance
The correct query will be:
document sortby (priority[/@type=“B”])
I did the same thing and it is working.
Unfortunately, Natalia, your query is not working.
If you begin predicate expression with “/”, it means that you specify absolute path to a node. The node after slash is considered as a root node. An attribute can never be a root node in XML. That is why no node will be chosen for sorting.
Tamino does not sign an error but It does not return the result needed either. All documents are in default order (sorted by ino:id).
Just a quick check - do you have the index type of the element set to standard or standard text - you get some really odd behaviours if you haven’t.
From what I have read what you are trying to do is not possible at this stage. The query originally specified returns no errors but also does not sort.
As I read in SAGSIS this feature has not been implemented yet :(. They promise it will be possible in future versions, may be in Newcastle.