From: Adam Dickmeiss Date: Wed, 13 Feb 2013 10:56:39 +0000 (+0100) Subject: Document ZOOM_resultset_sort X-Git-Tag: v4.2.52~21 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=def193190d4979179d1d216c77f9d61d8865e234;p=yaz-moved-to-github.git Document ZOOM_resultset_sort --- diff --git a/doc/zoom.xml b/doc/zoom.xml index 2ae3e08..c371520 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -9,8 +9,6 @@ ZOOM_connection_save_apdu_wrbuf ZOOM_diag_str(error) ZOOM_resultset_record_immediate(s, pos) ZOOM_resultset_cache_reset(r) -ZOOM_resultset_sort(r, sort_type, sort_spec) -ZOOM_resultset_sort1(r, sort_type, sort_spec) ZOOM_options_set_callback(opt, function, handle) ZOOM_options_create_with_parent2(parent1, parent2) ZOOM_options_getl(opt, name, len) @@ -437,11 +435,11 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) More query types will be added in future versions of &yaz;, such as CCL to RPN-mapping, native CCL query, etc. In addition to a search, a sort criteria may be set. Function - ZOOM_query_sortby specifies a - sort criteria using the same string notation for sort as offered by - the YAZ client. + ZOOM_query_sortby enables Z39.50 sorting and + it takes sort criteria using the same string notation as + yaz-client's sort command. - + ZOOM_query_sortby2 is similar to ZOOM_query_sortby but allows a strategy for sorting. The reason for the strategy parameter is that some @@ -474,7 +472,7 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) cqlCQL SORTBY - sru11SRU sortKeys element + sru11SRU sortKeys parameter solrSolr sort @@ -652,6 +650,31 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) + + + Z39.50 Result-set Sort + + void ZOOM_resultset_sort(ZOOM_resultset r, + const char *sort_type, const char *sort_spec); + + int ZOOM_resultset_sort1(ZOOM_resultset r, + const char *sort_type, const char *sort_spec); + + + ZOOM_resultset_sort and + ZOOM_resultset_sort1 both sort an existing + result-set. The sort_type parameter is not use. Set it to "yaz". + The sort_spec is same notation as ZOOM_query_sortby and identical + to that offered by yaz-client's + sort command. + + + These functions only work for Z39.50. Use the more generic utility + + ZOOM_query_sortby2 + for other protocols (and even Z39.50). + + Z39.50 Protocol behavior