projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forgot to commit the new rset.h when removing rewind ops
[idzebra-moved-to-github.git]
/
index
/
index.h
diff --git
a/index/index.h
b/index/index.h
index
afb416e
..
0e873de
100644
(file)
--- a/
index/index.h
+++ b/
index/index.h
@@
-1,5
+1,5
@@
-/* $Id: index.h,v 1.109 2004-06-14 10:31:56 mike Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
+/* $Id: index.h,v 1.123 2004-09-28 12:39:55 adam Exp $
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
This file is part of the Zebra server.
Index Data Aps
This file is part of the Zebra server.
@@
-20,15
+20,12
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
02111-1307, USA.
*/
-
-
#ifndef INDEX_H
#define INDEX_H
#include <time.h>
#ifndef INDEX_H
#define INDEX_H
#include <time.h>
-#include <zebraver.h>
+#include <idzebra/version.h>
#include <zebrautl.h>
#include <zebrautl.h>
-#include <zebramap.h>
#include <sortidx.h>
#if HAVE_SYS_TIMES_H
#include <sortidx.h>
#if HAVE_SYS_TIMES_H
@@
-38,32
+35,28
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <dict.h>
#include <isams.h>
#include <dict.h>
#include <isams.h>
-#include <isam.h>
#include <isamc.h>
#include <isamc.h>
-#include <isamd.h>
#include <isamb.h>
#include <isamb.h>
-#define ISAM_DEFAULT "c"
-#include <data1.h>
-#include <recctrl.h>
+#include <d1_absyn.h>
+#include <idzebra/recgrs.h>
#include "recindex.h"
#include "recindex.h"
-#include "zebraapi.h"
+#include <idzebra/api.h>
#include "zinfo.h"
#include <passwddb.h>
#include <rset.h>
YAZ_BEGIN_CDECL
#include "zinfo.h"
#include <passwddb.h>
#include <rset.h>
YAZ_BEGIN_CDECL
+#define ISAM_DEFAULT "b"
+
#define SU_SCHEME 1
#define IT_MAX_WORD 256
#define SU_SCHEME 1
#define IT_MAX_WORD 256
-#define IT_KEY_HAVE_SEQNO 1
-#define IT_KEY_HAVE_FIELD 0
-
-typedef int SYSNO;
+#define IT_KEY_LEVEL_MAX 4
struct it_key {
struct it_key {
- int sysno;
- int seqno;
+ int len;
+ zint mem[IT_KEY_LEVEL_MAX];
};
enum dirsKind { dirs_dir, dirs_file };
};
enum dirsKind { dirs_dir, dirs_file };
@@
-89,7
+82,7
@@
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);
void dirs_rmdir (struct dirs_info *p, const char *src);
struct dirs_entry *dirs_last (struct dirs_info *p);
void dirs_mkdir (struct dirs_info *p, const char *src, time_t mtime);
void dirs_rmdir (struct dirs_info *p, const char *src);
-void dirs_add (struct dirs_info *p, const char *src, int sysno, time_t mtime);
+void dirs_add (struct dirs_info *p, const char *src, SYSNO sysno, time_t mtime);
void dirs_del (struct dirs_info *p, const char *src);
void dirs_free (struct dirs_info **pp);
void dirs_del (struct dirs_info *p, const char *src);
void dirs_free (struct dirs_info **pp);
@@
-106,8
+99,9
@@
void repositoryShow (ZebraHandle zh, const char *path);
int key_open (ZebraHandle zh, int mem);
int key_close (ZebraHandle zh);
int key_compare (const void *p1, const void *p2);
int key_open (ZebraHandle zh, int mem);
int key_close (ZebraHandle zh);
int key_compare (const void *p1, const void *p2);
+void key_init(struct it_key *k);
char *key_print_it (const void *p, char *buf);
char *key_print_it (const void *p, char *buf);
-int key_get_seq (const void *p);
+zint 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);
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);
@@
-117,7
+111,6
@@
void inv_compact (BFiles bfs);
void key_input (ZebraHandle zh, int nkeys, int cache, Res res);
ISAMS_M *key_isams_m (Res res, ISAMS_M *me);
ISAMC_M *key_isamc_m (Res res, ISAMC_M *me);
void key_input (ZebraHandle zh, int nkeys, int cache, Res res);
ISAMS_M *key_isams_m (Res res, ISAMS_M *me);
ISAMC_M *key_isamc_m (Res res, ISAMC_M *me);
-ISAMD_M *key_isamd_m (Res res, ISAMD_M *me);
int merge_sort (char **buf, int from, int to);
int key_SU_code (int ch, char *out);
int merge_sort (char **buf, int from, int to);
int key_SU_code (int ch, char *out);
@@
-180,6
+173,7
@@
struct encode_info {
int prevseq;
int prevcmd;
int keylen; /* tells if we have an unwritten key in buf, and how long*/
int prevseq;
int prevcmd;
int keylen; /* tells if we have an unwritten key in buf, and how long*/
+ void *encode_handle;
char buf[ENCODE_BUFLEN];
};
char buf[ENCODE_BUFLEN];
};
@@
-191,7
+185,7
@@
void encode_key_flush (struct encode_info *i, FILE *outf);
typedef struct {
char *term;
char *db;
typedef struct {
char *term;
char *db;
- int sysno;
+ zint sysno;
int score;
} *ZebraPosSet;
int score;
} *ZebraPosSet;
@@
-208,34
+202,20
@@
struct recKeys {
int buf_used;
int buf_max;
char *buf;
int buf_used;
int buf_max;
char *buf;
- char prevAttrSet;
- short prevAttrUse;
- int prevSeqNo;
+ void *codec_handle;
};
};
-#if 1
struct sortKeys {
int buf_used;
int buf_max;
char *buf;
};
struct sortKeys {
int buf_used;
int buf_max;
char *buf;
};
-#else
-struct sortKey {
- char *string;
- int length;
- int attrSet;
- int attrUse;
- struct sortKey *next;
-};
-#endif
struct zebra_register {
char *name;
ISAMS isams;
struct zebra_register {
char *name;
ISAMS isams;
- ISAM isam;
ISAMC isamc;
ISAMC isamc;
- ISAMD isamd;
ISAMB isamb;
Dict dict;
Dict matchDict;
ISAMB isamb;
Dict dict;
Dict matchDict;
@@
-278,6
+258,8
@@
struct zebra_service {
Zebra_mutex_cond session_lock;
Passwd_db passwd_db;
const char *path_root;
Zebra_mutex_cond session_lock;
Passwd_db passwd_db;
const char *path_root;
+ RecTypeClass record_classes;
+ NMEM nmem;
};
};
@@
-304,7
+286,7
@@
struct zebra_session {
Res res;
char *user_perm;
int errCode;
Res res;
char *user_perm;
int errCode;
- int hits;
+ zint hits;
char *errString;
#if HAVE_SYS_TIMES_H
struct tms tms1;
char *errString;
#if HAVE_SYS_TIMES_H
struct tms tms1;
@@
-312,10
+294,10
@@
struct zebra_session {
#endif
int shadow_enable;
#endif
int shadow_enable;
- int records_inserted;
- int records_updated;
- int records_deleted;
- int records_processed;
+ zint records_inserted;
+ zint records_updated;
+ zint records_deleted;
+ zint records_processed;
char *record_encoding;
yaz_iconv_t iconv_to_utf8;
char *record_encoding;
yaz_iconv_t iconv_to_utf8;
@@
-343,7
+325,7
@@
struct rank_control {
* int rssize; // number of records in result set (estimate?)
*/
void (*end)(struct zebra_register *reg, void *set_handle);
* 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);
+ int (*calc)(void *set_handle, zint sysno);
void (*add)(void *set_handle, int seqno, int term_index);
};
void (*add)(void *set_handle, int seqno, int term_index);
};
@@
-357,7
+339,7
@@
struct term_set_list {
struct term_set_entry *last;
};
struct term_set_entry *last;
};
-RSET rpn_search (ZebraHandle zh, NMEM mem,
+RSET rpn_search (ZebraHandle zh, NMEM mem, NMEM rset_nmem,
Z_RPNQuery *rpn, int num_bases, char **basenames,
const char *setname, ZebraSet sset);
Z_RPNQuery *rpn, int num_bases, char **basenames,
const char *setname, ZebraSet sset);
@@
-370,7
+352,8
@@
void rpn_scan (ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt,
RSET rset_trunc (ZebraHandle zh, ISAMS_P *isam_p, int no,
const char *term, int length_term, const char *flags,
RSET rset_trunc (ZebraHandle zh, ISAMS_P *isam_p, int no,
const char *term, int length_term, const char *flags,
- int preserve_position, int term_type);
+ int preserve_position, int term_type, NMEM rset_nmem,
+ const struct key_control *kctrl, int scope);
void resultSetAddTerm (ZebraHandle zh, ZebraSet s, int reg_type,
const char *db, int set,
void resultSetAddTerm (ZebraHandle zh, ZebraSet s, int reg_type,
const char *db, int set,
@@
-422,7
+405,7
@@
extern struct rank_control *rank1_class;
extern struct rank_control *rankzv_class;
extern struct rank_control *rankliv_class;
extern struct rank_control *rankzv_class;
extern struct rank_control *rankliv_class;
-int zebra_record_fetch (ZebraHandle zh, int sysno, int score, ODR stream,
+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);
oid_value input_format, Z_RecordComposition *comp,
oid_value *output_format, char **rec_bufp,
int *rec_lenp, char **basenamep);
@@
-436,7
+419,7
@@
int buffer_extract_record (ZebraHandle zh,
int delete_flag,
int test_mode,
const char *recordType,
int delete_flag,
int test_mode,
const char *recordType,
- int *sysno,
+ SYSNO *sysno,
const char *match_criteria,
const char *fname,
int force_update,
const char *match_criteria,
const char *fname,
int force_update,
@@
-488,12
+471,14
@@
int zebra_file_stat (const char *file_name, struct stat *buf,
void zebra_livcode_transform(ZebraHandle zh, Z_RPNQuery *query);
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);
-
+void *iscz1_start ();
+void iscz1_reset (void *vp);
+void iscz1_stop (void *p);
+void iscz1_decode (void *vp, char **dst, const char **src);
+void iscz1_encode (void *vp, char **dst, const char **src);
+Dict dict_open_res (BFiles bfs, const char *name, int cache, int rw,
+ int compact_flag, Res res);
YAZ_END_CDECL
YAZ_END_CDECL