[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Search results sorting by compound field elements



Half-answering my own question:

my %options = ("custom_order" => "name");
my $list = $ds->search(%options);

actually does what I want, but doesn't resolve the larger question of sorting by sub-fields - e.g. if I wanted to sort the list by given name rather than family name...


From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Alan.Stiles
Sent: 20 April 2016 15:28
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Search results sorting by compound field elements

Hi all,
Anyone got a clue how to format the 'custom_order' parameter of a dataset search query to sort by sub-fields of a compound field?

i.e. - running a search over the 'user' dataset and I want to sort the results by name_family then name_given of the compound 'name' field.

Currently running (based on the search method from http://wiki.eprints.org/w/API:EPrints/DataSet#Object_Methods ):

$list = $ds->search( {"custom_order" => "name_given/name_family" };

But it doesn't seem to be sorting the list at all

Thanks,

Alan
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160420/5b5db78c/attachment.html