For approx_limit == 0, use unlimited hit count
[idzebra-moved-to-github.git] / index / zebraapi.c
index 5ee16a2..9a85e32 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zebraapi.c,v 1.174 2005-06-07 11:36:38 adam Exp $
+/* $Id: zebraapi.c,v 1.176 2005-06-10 10:55:18 adam Exp $
    Copyright (C) 1995-2005
    Index Data ApS
 
@@ -115,6 +115,7 @@ ZebraHandle zebra_open (ZebraService zs)
     zh->num_basenames = 0;
     zh->basenames = 0;
 
+    zh->approx_limit = 1000000000;
     zh->trans_no = 0;
     zh->trans_w_no = 0;
 
@@ -864,6 +865,14 @@ ZEBRA_RES zebra_select_databases (ZebraHandle zh, int num_bases,
     return ZEBRA_OK;
 }
 
+ZEBRA_RES zebra_set_approx_limit(ZebraHandle zh, zint approx_limit)
+{
+    if (approx_limit == 0)
+         approx_limit = 2000000000;
+    zh->approx_limit = approx_limit;
+    return ZEBRA_OK;
+}
+
 ZEBRA_RES zebra_search_RPN(ZebraHandle zh, ODR o, Z_RPNQuery *query,
                           const char *setname, zint *hits)
 {