-void resultSetInvalidate (ZebraHandle zh);
-
-int zebra_server_lock_init (ZebraService zh);
-int zebra_server_lock_destroy (ZebraService zh);
-int zebra_server_lock (ZebraService zh, int lockCommit);
-void zebra_server_unlock (ZebraService zh, int commitPhase);
-int zebra_server_lock_get_state (ZebraService zh, time_t *timep);
-
-typedef struct attent
-{
- int attset_ordinal;
- data1_local_attribute *local_attributes;
-} attent;
-
-void zebraRankInstall (struct zebra_register *reg, struct rank_control *ctrl);
-ZebraRankClass zebraRankLookup (ZebraHandle zh, const char *name);
-void zebraRankDestroy (struct zebra_register *reg);
-
-int att_getentbyatt(ZebraHandle zh, attent *res, oid_value set, int att,
- const char *sattr);
-
-extern struct rank_control *rank1_class;
-extern struct rank_control *rankzv_class;
-extern struct rank_control *rankliv_class;
-
-int zebra_record_fetch (ZebraHandle zh, SYSNO sysno, int score, ODR stream,
- oid_value input_format, Z_RecordComposition *comp,
- oid_value *output_format, char **rec_bufp,
- int *rec_lenp, char **basenamep,
- char **addinfo);
-
-void extract_get_fname_tmp (ZebraHandle zh, char *fname, int no);
-
-void zebra_index_merge (ZebraHandle zh);
-
-ZEBRA_RES buffer_extract_record (ZebraHandle zh,
- const char *buf, size_t buf_size,
- int delete_flag,
- int test_mode,
- const char *recordType,
- SYSNO *sysno,
- const char *match_criteria,
- const char *fname,
- int force_update,
- int allow_update);
-
-#if 0
-int extract_rec_in_mem (ZebraHandle zh, const char *recordType,
- const char *buf, size_t buf_size,
- const char *databaseName, int delete_flag,
- int test_mode, int *sysno,
- int store_keys, int store_data,
- const char *match_criteria);
-#endif
-void extract_flushWriteKeys (ZebraHandle zh, int final);
-
-struct zebra_fetch_control {
- off_t offset_end;
- off_t record_offset;
- off_t record_int_pos;
- const char *record_int_buf;
- int record_int_len;
- int fd;
-};
-
-int zebra_record_ext_read (void *fh, char *buf, size_t count);
-off_t zebra_record_ext_seek (void *fh, off_t offset);
-off_t zebra_record_ext_tell (void *fh);
-off_t zebra_record_int_seek (void *fh, off_t offset);
-off_t zebra_record_int_tell (void *fh);
-int zebra_record_int_read (void *fh, char *buf, size_t count);
-void zebra_record_int_end (void *fh, off_t offset);
+void resultSetInvalidate(ZebraHandle zh);
+
+int zebra_record_fetch(ZebraHandle zh, const char *setname,
+ zint sysno, int score,
+ zebra_snippets *hit_snippet, ODR stream,
+ const Odr_oid *input_format, Z_RecordComposition *comp,
+ const Odr_oid **output_format, char **rec_bufp,
+ int *rec_lenp, char **basenamep,
+ char **addinfo);
+
+void extract_get_fname_tmp(ZebraHandle zh, char *fname, int no);
+
+void extract_snippet(ZebraHandle zh, zebra_snippets *sn,
+ struct ZebraRecStream *stream, RecType rt,
+ void *recTypeClientData);
+
+int zebra_get_rec_snippets(ZebraHandle zh, zint sysno,
+ zebra_snippets *snippets);
+
+void zebra_index_merge(ZebraHandle zh);
+
+ZEBRA_RES zebra_buffer_extract_record(ZebraHandle zh,
+ const char *buf, size_t buf_size,
+ enum zebra_recctrl_action_t action,
+ int test_mode,
+ const char *recordType,
+ zint *sysno,
+ const char *match_criteria,
+ const char *fname);
+
+ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh,
+ struct ZebraRecStream *stream,
+ enum zebra_recctrl_action_t action,
+ int test_mode,
+ const char *recordType,
+ zint *sysno,
+ const char *match_criteria,
+ const char *fname,
+ RecType recType,
+ void *recTypeClientData,
+ int *more);
+
+YAZ_EXPORT void zebra_create_stream_mem(struct ZebraRecStream *stream,
+ const char *buf, size_t sz);
+YAZ_EXPORT void zebra_create_stream_fd(struct ZebraRecStream *stream,
+ int fd, off_t start_offset);
+void print_rec_keys(ZebraHandle zh, zebra_rec_keys_t reckeys);
+
+ZEBRA_RES zebra_rec_keys_to_snippets(ZebraHandle zh, zebra_rec_keys_t reckeys,
+ zebra_snippets *snippets);
+ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname,
+ zint sysno, zebra_snippets *snippets);
+
+ZEBRA_RES zebra_extract_explain(void *handle, Record rec, data1_node *n);
+
+ZEBRA_RES zebra_extract_file(ZebraHandle zh, zint *sysno, const char *fname,
+ int deleteFlag);
+
+ZEBRA_RES zebra_begin_read(ZebraHandle zh);
+ZEBRA_RES zebra_end_read(ZebraHandle zh);
+
+int zebra_file_stat(const char *file_name, struct stat *buf,
+ int follow_links);