+YAZ_BEGIN_CDECL
+
+typedef struct rsfd *RSFD;
+typedef struct rset *RSET;
+
+struct ord_list {
+ int ord;
+ struct ord_list *next;
+};
+
+struct ord_list *ord_list_create(NMEM nmem);
+struct ord_list *ord_list_append(NMEM nmem, struct ord_list *list, int ord);
+struct ord_list *ord_list_dup(NMEM nmem, struct ord_list *list);
+
+/**
+ * rset_term is all we need to know of a term to do ranking etc.
+ * As far as the rsets are concerned, it is just a dummy pointer to
+ * be passed around.
+ */
+struct rset_term {
+ char *name; /** the term itself in internal encoding (UTF-8/raw) */
+ char *flags; /** flags for rank method */
+ int type; /** Term_type from RPN Query. Actually this
+ is Z_Term_general, Z_Term_numeric,
+ Z_Term_characterString, ..
+ This info is used to return encoded term back for
+ search-result-1 .
+ */
+ int reg_type; /** register type */
+ RSET rset; /** the rset corresponding to this term */
+ void *rankpriv;/** private stuff for the ranking algorithm */
+ zint hits_limit;/** limit for hits if > 0 */
+ char *ref_id; /** reference for this term */
+ struct ord_list *ol;
+};