Added support for the sortby2 function to allow sorting of SOLR databases.
authorSimon Jacob <sjacob@nla.gov.au>
Mon, 11 Feb 2013 01:00:00 +0000 (12:00 +1100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 11 Feb 2013 12:28:53 +0000 (13:28 +0100)
ZOOM.xs
lib/ZOOM.pm

diff --git a/ZOOM.xs b/ZOOM.xs
index 4e5de76..b10513e 100644 (file)
--- a/ZOOM.xs
+++ b/ZOOM.xs
@@ -388,6 +388,12 @@ int
 ZOOM_query_sortby(s, criteria)
        ZOOM_query      s
        const char *    criteria
+       
+int
+ZOOM_query_sortby2(s, strategy, criteria)
+       ZOOM_query      s
+       const char *    strategy
+       const char *    criteria
 
 ZOOM_scanset
 ZOOM_connection_scan(c, startterm)
index b85163f..6b2f8c9 100644 (file)
@@ -578,6 +578,14 @@ sub sortby {
        or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby);
 }
 
+sub sortby2 {
+    my $this = shift();
+    my($strategy, $sortby) = @_;
+
+    Net::Z3950::ZOOM::query_sortby2($this->_query(), $strategy, $sortby) == 0
+       or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby);
+}
+
 sub destroy {
     my $this = shift();