[opencms-dev] Solr sorting

Thorsten Duhn duhn at regio-gmbh.de
Fri Jan 17 11:53:55 CET 2014


Hello,

i created some list content types like the list-large and list-small 
examples in the bootstrap example module. There sorting is defined in 
Solr query this way:

sort=collector.priority_prop ${con.value.SortOrder}, 
newsdate_${cms.locale}_dt ${con.value.SortOrder}

Not sure why priority is first but that works okay for blog or news like 
content (with newsdate mapped). But now I need it sorted for elements 
title (respecting language of course).

I tried "Title_prop" what at least does not throw exeption, but seems to 
have no effect. "title_prop" also, but seems to sort for file name. But 
when I try to map Title and use f.i. "sorttitle" or "sorttitle_de" I end 
in CmsSearchException.

This is how I try to map in the elements xsd:

<searchsettings containerPageOnly="false">
     <searchsetting element="Title" searchcontent="false">
         <solrfield targetfield="sorttitle">
             <mapping type="property">Title</mapping>
         </solrfield>
     </searchsetting>
</searchsettings>

It seems to be easy but I cannot get it... Can someone explain?

Regards,
Thorsten




More information about the opencms-dev mailing list