-int zebraExplain_lookup_attr_su(ZebraExplainInfo zei, int set, int use);
-int zebraExplain_add_attr_su(ZebraExplainInfo zei, int set, int use);
-int zebraExplain_lookup_attr_str(ZebraExplainInfo zei, const char *str);
-int zebraExplain_add_attr_str(ZebraExplainInfo zei, const char *str);
-void zebraExplain_addSchema (ZebraExplainInfo zei, Odr_oid *oid);
-void zebraExplain_recordCountIncrement (ZebraExplainInfo zei, int adjust_num);
-void zebraExplain_recordBytesIncrement (ZebraExplainInfo zei, int adjust_num);
-zint zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num);
-void zebraExplain_loadAttsets (data1_handle dh, Res res);
-void zebraExplain_flush (ZebraExplainInfo zei, void *updateHandle);
-
-int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord,
- const char **db, int *set, int *use);
+int zebraExplain_add_attr_su(ZebraExplainInfo zei, int index_type,
+ int set, int use);
+
+/** \brief lookup ordinal from string index + index type
+ \param zei explain info
+ \param cat category
+ \param index_type index type
+ \param str index string
+ \returns -1 no such index+type exist; ordinal otherwise
+*/
+
+int zebraExplain_lookup_attr_str(ZebraExplainInfo zei,
+ zinfo_index_category_t cat,
+ const char *index_type,
+ const char *str);
+int zebraExplain_add_attr_str(ZebraExplainInfo zei,
+ zinfo_index_category_t cat,
+ const char *index_type,
+ const char *str);
+void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid);
+void zebraExplain_recordCountIncrement(ZebraExplainInfo zei, int adjust_num);
+void zebraExplain_recordBytesIncrement(ZebraExplainInfo zei, int adjust_num);
+zint zebraExplain_runNumberIncrement(ZebraExplainInfo zei, int adjust_num);
+void zebraExplain_loadAttsets(data1_handle dh, Res res);
+void zebraExplain_flush(ZebraExplainInfo zei, void *updateHandle);
+
+int zebraExplain_lookup_ord(ZebraExplainInfo zei, int ord,
+ const char **index_type, const char **db,
+ const char **string_index);
+
+int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord,
+ int term_delta, int doc_delta);
+
+zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord);
+zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord);