Are you trying to sort by class (ie. Article, Product, Forum Message, etc.)?
If so you want to use:
sort_by, array( 'class_name', true() )
If however you want to sort on an identifier with the class it is not documented very well, but what you need to do is also specify the name of the class identifier.
ie. The class "Product" has an identifier "product_nr", to sort by this you need to use:
Hi,
I think, you should take care about terminologies here: "Class name" is not "class identifier" and this is NOT "class ID".
For example:
The Class name might be "Article" (or, if I decide to translate it "Artikel")
The class identfier would be "article" and you should not change this in translating or in customization as this could and should be used in templates. I think, this is, what Craig wants to do. Class-ID is a number (ie. "1").