AnsweredAssumed Answered

custom field search failure

Question asked by lauraeis on Dec 4, 2012
Latest reply on Feb 7, 2014 by maddy
Hi,
Is there any problem with using text field in search sort?
I have created a sorting fields and labels:
          <sort labelId="search.sort.relevance"></sort>
     <sort labelId="Numurs">custom:documentRegNumber</sort>
     <sort labelId="Dokumenta veids">custom:documentType</sort>
          <sort labelId="Dokumenta nosaukums">custom:documentNameClasification</sort>
     <sort labelId="Datums">cm:created|false</sort>
     <sort labelId="Autors">cm:author</sort>
     <sort labelId="Arhīva lietas numurs">custom:archiveCaseNumber</sort>
     <sort labelId="Rediģēšanas datums (pēdējais)">cm:modified</sort>
     <sort labelId="search.sort.mimetype">.mimetype</sort>

Everything works fine (custom category fields too) except custom:documentRegNumber and custom:archiveCaseNumber witch are text types:
    <property name="custom:documentRegNumber">
          <title>Dokumenta reģistrācijas numurs</title>
          <type>d:text</type>
          <mandatory>true</mandatory>
    </property>
    <property name="custom:archiveCaseNumber">
          <title>Arhīva lietas numurs</title>
          <type>d:text</type>
          <mandatory>false</mandatory>
    </property>

In log file I get:
2012-12-04 18:44:25,923  ERROR [solr.core.SolrCore] [http-bio-8443-exec-1] java.lang.UnsupportedOperationException: Ordering not supported for @{custom.model}documentRegNumber

So, I want to know, is there any problem with using text field in sorting or I am doing something wrong?

Regards,
Laura

Outcomes