[Koha-bugs] [Bug 30879] Add option to sort by local-number in zebra

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 2 01:31:39 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30879

--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
(In reply to Nick Clemens from comment #0)
> I am not sure how to specify sorting by number index, and not word

The short answer is that you don't. 

If you look at
./etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl, you'll see
that "pubdate" has a word, number, year, and sort index. You would just need to
add Local-number:s for the target index.

<z:index name="pubdate:w">
  <xslo:value-of select="substring(., 8, 4)"/>
</z:index>
<z:index name="pubdate:n">
  <xslo:value-of select="substring(., 8, 4)"/>
</z:index>
<z:index name="pubdate:y">
  <xslo:value-of select="substring(., 8, 4)"/>
</z:index>
<z:index name="pubdate:s">
  <xslo:value-of select="substring(., 8, 4)"/>
</z:index>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list