cancel
Showing results for 
Search instead for 
Did you mean: 

solr ordering not supported for cm:firstName

gvarathan
Champ in-the-making
Champ in-the-making
Hi,
I am using alfresco enterprise edition 4.1.4 with solr. when i perform a search on user object and perform sort column for cm:firstName.  it is giving below error in the solr console.

2013-04-26 14:35:07,805  ERROR [solr.core.SolrCore] [http-7443-1] java.lang.UnsupportedOperationException: Ordering not
supported for @cm:firstName

it is the same  case for most of the cm fields like cm:firstName, cm:userName, cm:lockOwner.

i had the same issue with my custom model, after looking it the implmetation. i have specified each property in the model with tokenized to both and the problem went away.
                   index enabled="true"
                    atomic:false
                    stored:false
                                       tokenised:both
                     

can you please guide me the best method to fix this in alfresco models
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

Indeed Tokenised "false" or "both" is required for ordering d:text, d:mltext, d:date and d:datetime.
If text is just tokenised it will order by the lowest or highest token - which is probably not what you want (unless you only ever have one token. The lucene sub-systems allows this and is confusing, SOLR makes you do it right.

Andy 

maddy
Champ in-the-making
Champ in-the-making
I made both, index to true & tokenised to both/false but still solr showing the same issue can any one tell me why it is showing this issue similar sorting conditions are working for other categories, but for one category it is failing.

solr can sort fields with characters like 'mdash' ?????