Added support for specification of staticrank for grs-class of filters.
[idzebra-moved-to-github.git] / include / idzebra / dict.h
index 1e819d2..8d1edf2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: dict.h,v 1.10 2006-08-29 14:25:40 adam Exp $
+/* $Id: dict.h,v 1.13 2006-12-12 13:42:23 adam Exp $
    Copyright (C) 1995-2006
    Index Data ApS
 
@@ -153,9 +153,12 @@ int dict_lookup_grep(Dict dict, const char *p, int range, void *client,
     \param after number of terms to be visited following str
     \param client client data pointer to be passed to match function f
     \param f function be called for each matching term
-    \retval 0 Operation complete. Function f returned zero value always
-    \retval 1 Operation incomplete. Function f returned a non-zero value
+    \retval 0 Successful
     \retval -1 error
+
+    If the callback function f returns 0 the scan operation visits
+    all terms in range (before to after); if the function returns non-zero
+    the scan operation is cancelled.
 */
 YAZ_EXPORT
 int dict_scan(Dict dict, char *str, 
@@ -184,6 +187,33 @@ void dict_grep_cmap(Dict dict, void *vp,
 YAZ_EXPORT
 int dict_copy_compact(BFiles bfs, const char *from, const char *to);
 
+/** \brief reset Dictionary (makes it empty)
+    \param dict dictionary handle
+*/
+YAZ_EXPORT
+void dict_clean(Dict dict);
+
+/** \brief get number of lookup operations, since dict_open 
+    \param dict dictionary handle
+    \returns number of operatons
+*/
+YAZ_EXPORT
+zint dict_get_no_lookup(Dict dict);
+
+/** \brief get number of insert operations, since dict_open 
+    \param dict dictionary handle
+    \returns number of operatons
+*/
+YAZ_EXPORT
+zint dict_get_no_insert(Dict dict);
+
+/** \brief get number of page split operations, since dict_open 
+    \param dict dictionary handle
+    \returns number of operatons
+*/
+YAZ_EXPORT
+zint dict_get_no_split(Dict dict);
+
 YAZ_END_CDECL
    
 #endif