Download & Extend

Sort on first field when it has multiple values

Project:Apache Solr Biblio
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Citations often have multiple values per field. In order to sort on one of these fields, the first value in the array can be used. This code adds the fields to the index by detecting fields with multiple values and adding the first one to an extra sorting field in the index.

AttachmentSize
sorts.patch4.45 KB

Comments

#1

Re-rolled patch to remove changes to CVS headers. Not reviewed yet.

AttachmentSize
sorts-625156-1.patch 2.58 KB

#2

Status:needs review» needs work

I think I prefer something more along the lines of this:

<?php
          $sort_index_key
= FALSE;
          if (
$biblio['multiple']) {
           
$sort_index_key = 'sort_ss_' . $biblio['name'];
          }
?>

#3

Status:needs work» closed (won't fix)

Refactoring is for loosers ;-)

nobody click here