X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Findex.h;h=f04b62348970c5d626555771af37151a3d6a3e8d;hb=d5c921e71defabcb16299ee27bd7c9bdabe2e461;hp=be2e858e0c590e9e9b37525f8f35806114cbafda;hpb=deb0cef3d4d19dc6508b2fed71711b3fb1be26a2;p=idzebra-moved-to-github.git diff --git a/index/index.h b/index/index.h index be2e858..f04b623 100644 --- a/index/index.h +++ b/index/index.h @@ -1,4 +1,4 @@ -/* $Id: index.h,v 1.173 2006-08-16 13:16:36 adam Exp $ +/* $Id: index.h,v 1.180 2006-10-29 17:20:01 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -127,7 +127,7 @@ int key_SU_code (int ch, char *out); #define FNAME_CONFIG "zebra.cfg" #define GMATCH_DICT "gmatch" -#define FMATCH_DICT "fmatch" +#define FMATCH_DICT "fmatch%d" struct strtab *strtab_mk (void); int strtab_src (struct strtab *t, const char *name, void ***infop); @@ -299,11 +299,11 @@ ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, int num_bases, char **basenames, RSET *result_set); -ZEBRA_RES rpn_scan (ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, - oid_value attributeset, - int num_bases, char **basenames, - int *position, int *num_entries, ZebraScanEntry **list, - int *is_partial, RSET limit_set, int return_zero); +ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, + oid_value attributeset, + int num_bases, char **basenames, + int *position, int *num_entries, ZebraScanEntry **list, + int *is_partial, RSET limit_set); RSET rset_trunc(ZebraHandle zh, ISAM_P *isam_p, int no, const char *term, int length_term, const char *flags, @@ -363,6 +363,19 @@ ZEBRA_RES zebra_buffer_extract_record(ZebraHandle zh, int force_update, int allow_update); +ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, + struct ZebraRecStream *stream, + int delete_flag, + int test_mode, + const char *recordType, + SYSNO *sysno, + const char *match_criteria, + const char *fname, + int force_update, + int allow_update, + RecType recType, + void *recTypeClientData); + #if 0 int extract_rec_in_mem (ZebraHandle zh, const char *recordType, const char *buf, size_t buf_size, @@ -373,23 +386,10 @@ int extract_rec_in_mem (ZebraHandle zh, const char *recordType, #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); - +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_snippets_rec_keys(ZebraHandle zh, zebra_rec_keys_t reckeys, @@ -410,7 +410,7 @@ int zebra_file_stat (const char *file_name, struct stat *buf, void zebra_livcode_transform(ZebraHandle zh, Z_RPNQuery *query); -void *iscz1_start (); +void *iscz1_start (void); void iscz1_reset (void *vp); void iscz1_stop (void *p); void iscz1_decode (void *vp, char **dst, const char **src); @@ -452,6 +452,25 @@ ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, ZEBRA_RES zebra_update_file_match(ZebraHandle zh, const char *path); ZEBRA_RES zebra_update_from_path(ZebraHandle zh, const char *path); ZEBRA_RES zebra_delete_from_path(ZebraHandle zh, const char *path); +ZEBRA_RES zebra_remove_file_match(ZebraHandle zh); + + +struct rpn_char_map_info +{ + ZebraMaps zm; + int reg_type; +}; + +void rpn_char_map_prepare(struct zebra_register *reg, int reg_type, + struct rpn_char_map_info *map_info); + +ZEBRA_RES zapt_term_to_utf8(ZebraHandle zh, Z_AttributesPlusTerm *zapt, + char *termz); + + +#define FIRST_IN_FIELD_STR "\001^" +#define FIRST_IN_FIELD_CHAR 1 +#define FIRST_IN_FIELD_LEN 2 YAZ_END_CDECL