We are using SDL Tridion 2013 SP1. In Related Keyword functionality ordering is not fetched correctly at fronted using broker API.

We are using following code to get all the Related keywords, but it's order is not shown correctly as the order we defined in CMS.

TaxonomyFactory tx = new TaxonomyFactory();

com.tridion.taxonomies.Keyword keyword = tx.getTaxonomyKeyword(keywordId);

Can someone please help, is it a bug in the CMS or we are missing something?

I understand that CMS and CDA implementation is different and also we can write custom code to change the order, But in CMS we have option to set related keyword position (using Move up and down button), So ideally we should get the same order using broker API(Like we get for component list etc).

Please suggest some solution or is it a bug in CMS.

Thanks Piyush jain

  • Is it in a recognisable alternate order? e.g. alphabetical? Oct 8, 2014 at 12:21

1 Answer 1


The order in which the CM GUI spits out KWs is alphamumeric just like everything else in the CM. The order on CD is completely independent, and depends on how the CD Database decides to return it (whatever the DB's default record ordering is [probably by PK or row number]).

So if you want specific ordering, then specify a sort param into the query or do a custom manual sort by implementing a custom compareTo method (Comparator class) on the resultset sort method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.