-YAZ_EXPORT int zebra_repository_update(ZebraHandle zh, const char *path);
-YAZ_EXPORT int zebra_repository_delete(ZebraHandle zh, const char *path);
-YAZ_EXPORT int zebra_repository_show(ZebraHandle zh, const char *path);
-
-YAZ_EXPORT int zebra_add_record(ZebraHandle zh, const char *buf, int buf_size);
-
-YAZ_EXPORT
-ZEBRA_RES zebra_insert_record(ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match,
- const char *fname,
- const char *buf, int buf_size,
- int force_update);
-YAZ_EXPORT
-ZEBRA_RES zebra_update_record(ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match,
- const char *fname,
- const char *buf, int buf_size,
- int force_update);
-YAZ_EXPORT
-ZEBRA_RES zebra_delete_record(ZebraHandle zh,
- const char *recordType,
- SYSNO *sysno, const char *match, const char *fname,
- const char *buf, int buf_size,
- int force_update);
-
-YAZ_EXPORT
-int zebra_resultSetTerms(ZebraHandle zh, const char *setname,
- int no, zint *count,
- int *type, char *out, size_t *len);
-
-YAZ_EXPORT
+YAZ_EXPORT
+ZEBRA_RES zebra_repository_index(ZebraHandle zh, const char *path,
+ enum zebra_recctrl_action_t action);
+
+YAZ_EXPORT
+ZEBRA_RES zebra_repository_update(ZebraHandle zh, const char *path);
+
+YAZ_EXPORT
+ZEBRA_RES zebra_repository_delete(ZebraHandle zh, const char *path);
+
+YAZ_EXPORT
+ZEBRA_RES zebra_repository_show(ZebraHandle zh, const char *path);
+
+/** \brief Simple update record
+ \param zh session handle
+ \param buf record buffer
+ \param buf_size record buffer size
+
+ This function is a simple wrapper or zebra_update_record with
+ action=action_update (insert or replace) .
+*/
+YAZ_EXPORT
+ZEBRA_RES zebra_add_record(ZebraHandle zh, const char *buf, int buf_size);
+
+/** \brief Updates record
+ \param zh session handle
+ \param action (insert,replace,delete or update (replace/insert)
+ \param recordType filter type (0 indicates default)
+ \param sysno system id (0 may be passed for no known id)
+ \param match match criteria (0 may be passed for no known criteria)
+ \param fname filename to be printed for logging (0 may be passed)
+ \param buf record buffer
+ \param buf_size record buffer size
+*/
+YAZ_EXPORT
+ZEBRA_RES zebra_update_record(ZebraHandle zh,
+ enum zebra_recctrl_action_t action,
+ const char *recordType,
+ zint *sysno, const char *match,
+ const char *fname,
+ const char *buf, int buf_size);
+
+YAZ_EXPORT