X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=index%2Findex.h;h=6a9a274dc83868b31242cb52a41e68beefec557f;hb=3a2124aa85eea0583c7528bcc6f79a5fa1632a40;hp=208ef3b097d4b92d02b72fb51fea96bdf5703476;hpb=2a6f64379961f30bfe6376964ce279ab5242da1f;p=idzebra-moved-to-github.git diff --git a/index/index.h b/index/index.h index 208ef3b..6a9a274 100644 --- a/index/index.h +++ b/index/index.h @@ -1,4 +1,4 @@ -/* $Id: index.h,v 1.103 2004-01-22 11:27:21 adam Exp $ +/* $Id: index.h,v 1.109.2.2 2006-03-24 13:47:29 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -50,6 +50,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "zinfo.h" #include #include +#include YAZ_BEGIN_CDECL @@ -84,7 +85,7 @@ struct dirs_entry { void getFnameTmp (Res res, char *fname, int no); struct dirs_info *dirs_open (Dict dict, const char *rep, int rw); -struct dirs_info *dirs_fopen (Dict dict, const char *path); +struct dirs_info *dirs_fopen (Dict dict, const char *path, int rw); struct dirs_entry *dirs_read (struct dirs_info *p); struct dirs_entry *dirs_last (struct dirs_info *p); void dirs_mkdir (struct dirs_info *p, const char *src, time_t mtime); @@ -107,10 +108,11 @@ int key_open (ZebraHandle zh, int mem); int key_close (ZebraHandle zh); int key_compare (const void *p1, const void *p2); char *key_print_it (const void *p, char *buf); -int key_get_pos (const void *p); +int key_get_seq (const void *p); int key_compare_it (const void *p1, const void *p2); int key_qsort_compare (const void *p1, const void *p2); void key_logdump (int mask, const void *p); +void key_logdump_txt (int logmask, const void *p, const char *txt); void inv_prstat (ZebraHandle zh); void inv_compact (BFiles bfs); void key_input (ZebraHandle zh, int nkeys, int cache, Res res); @@ -151,19 +153,7 @@ int zebraIndexWait (ZebraHandle zh, int commitPhase); #define FNAME_ORG_LOCK "zebraorg.LCK" #define FNAME_TOUCH_TIME "zebraidx.time" -typedef struct zebra_lock_info *ZebraLockHandle; -ZebraLockHandle zebra_lock_create(const char *dir, - const char *file, int excl_flag); -void zebra_lock_destroy (ZebraLockHandle h); -int zebra_lock (ZebraLockHandle h); -int zebra_lock_nb (ZebraLockHandle h); -int zebra_unlock (ZebraLockHandle h); -int zebra_lock_fd (ZebraLockHandle h); void zebra_lock_prefix (Res res, char *dst); -char *zebra_mk_fname (const char *dir, const char *name); - -int zebra_lock_w (ZebraLockHandle h); -int zebra_lock_r (ZebraLockHandle h); void zebra_load_atts (data1_handle dh, Res res); @@ -301,6 +291,7 @@ struct zebra_session { int destroyed; ZebraSet sets; Res res; + char *user_perm; int errCode; int hits; char *errString; @@ -335,6 +326,11 @@ struct rank_control { void *(*create)(ZebraHandle zh); void (*destroy)(struct zebra_register *reg, void *class_handle); void *(*begin)(struct zebra_register *reg, void *class_handle, RSET rset); + /* ### Could add parameters to begin: + * char *index; // author, title, etc. + * int dbsize; // number of records in database + * int rssize; // number of records in result set (estimate?) + */ void (*end)(struct zebra_register *reg, void *set_handle); int (*calc)(void *set_handle, int sysno); void (*add)(void *set_handle, int seqno, int term_index); @@ -408,7 +404,8 @@ 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); +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; @@ -420,6 +417,7 @@ int zebra_record_fetch (ZebraHandle zh, int sysno, int score, ODR stream, int *rec_lenp, char **basenamep); void extract_get_fname_tmp (ZebraHandle zh, char *fname, int no); + void zebra_index_merge (ZebraHandle zh); int buffer_extract_record (ZebraHandle zh, @@ -441,8 +439,7 @@ int extract_rec_in_mem (ZebraHandle zh, const char *recordType, int store_keys, int store_data, const char *match_criteria); #endif - -void extract_flushWriteKeys (ZebraHandle zh); +void extract_flushWriteKeys (ZebraHandle zh, int final); struct zebra_fetch_control { off_t offset_end; @@ -480,6 +477,13 @@ int zebra_file_stat (const char *file_name, struct stat *buf, void zebra_livcode_transform(ZebraHandle zh, Z_RPNQuery *query); +void *iscz1_code_start (int mode); +void iscz1_code_reset (void *vp); +void iscz1_code_stop (int mode, void *p); +void iscz1_code_item (int mode, void *vp, char **dst, char **src); + + + YAZ_END_CDECL #endif