From ba9b3f1a1499f53999f7b52f61be79524f5ba26f Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 1 Oct 2012 14:35:47 +0200 Subject: [PATCH] Extract and add sorting parameters --- src/solr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/solr.c b/src/solr.c index 95e0cf1..5863fe1 100644 --- a/src/solr.c +++ b/src/solr.c @@ -413,6 +413,15 @@ int yaz_solr_encode_request(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, yaz_add_name_value_str(encode, name, value, &i, "fl", request->recordSchema); + switch(srw_pdu->u.request->sort_type) + { + case Z_SRW_sort_type_none: + break; + case Z_SRW_sort_type_sort: + yaz_add_name_value_str(encode, name, value, &i, "sort", + srw_pdu->u.request->sort.sortKeys); + break; + } if (request->facetList) { Z_FacetList *facet_list = request->facetList; -- 1.7.10.4