X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsolr.c;h=de22233af8566f39582970ebb631e6ec300d5a30;hb=dbc40ad16aa82379d2884e106d79c7d83312667a;hp=95e0cf1955163a8b99a6467a5eae22154d8aa5d0;hpb=5242cb5a8634bfa38b9333ff7f903e718ac6e292;p=yaz-moved-to-github.git diff --git a/src/solr.c b/src/solr.c index 95e0cf1..de22233 100644 --- a/src/solr.c +++ b/src/solr.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ /** @@ -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;