[opencms-dev] Solr sorting

Thorsten Duhn duhn at regio-gmbh.de
Wed Jan 22 11:31:47 CET 2014


Hello,

this is still a topic for me. Using "Title_exact" I really get it sorted 
for Title, but I still don't know how to localize it. It is always 
sorted by primary German title.

http://localhost:8080/opencms/opencms/handleSolrSelect?fq=type:regis-wifoeprofil&fq=con_locales:en&sort=Title_exact+asc

In result XML I see something like "sorttitle_de" and "sorttitle_en", 
which include both the German title content. Is this the key, do I need 
to map something to "sorttitle"? Quite naive, tried with no luck.

Any help appreciated.

Regards,
Thorsten


> 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