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
Extend the ranking interface so staticrank is passed to calc method.
[idzebra-moved-to-github.git]
/
index
/
index.h
diff --git
a/index/index.h
b/index/index.h
index
a21f1f4
..
d620b87
100644
(file)
--- a/
index/index.h
+++ b/
index/index.h
@@
-1,4
+1,4
@@
-/* $Id: index.h,v 1.144 2005-06-22 19:42:38 adam Exp $
+/* $Id: index.h,v 1.148 2005-08-19 09:21:34 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-54,7
+54,7
@@
YAZ_BEGIN_CDECL
#define IT_MAX_WORD 256
#define IT_MAX_WORD 256
-#define IT_KEY_LEVEL_MAX 4
+#define IT_KEY_LEVEL_MAX 5
struct it_key {
int len;
zint mem[IT_KEY_LEVEL_MAX];
struct it_key {
int len;
zint mem[IT_KEY_LEVEL_MAX];
@@
-199,11
+199,15
@@
struct recKeys {
void *codec_handle;
};
void *codec_handle;
};
+#if NATTR
+
+#else
struct sortKeys {
int buf_used;
int buf_max;
char *buf;
};
struct sortKeys {
int buf_used;
int buf_max;
char *buf;
};
+#endif
struct zebra_register {
char *name;
struct zebra_register {
char *name;
@@
-231,10
+235,10
@@
struct zebra_register {
int active; /* 0=shutdown, 1=enabled and inactive, 2=activated */
struct recKeys keys;
int active; /* 0=shutdown, 1=enabled and inactive, 2=activated */
struct recKeys keys;
-#if 1
- struct sortKeys sortKeys;
+#if NATTR
+ struct recKeys sortKeys;
#else
#else
- struct sortKey *sortKeys;
+ struct sortKeys sortKeys;
#endif
char **key_buf;
size_t ptr_top;
#endif
char **key_buf;
size_t ptr_top;
@@
-246,7
+250,6
@@
struct zebra_register {
struct zebra_service {
int stop_flag;
Res global_res;
struct zebra_service {
int stop_flag;
Res global_res;
- char *configName;
struct zebra_session *sessions;
struct zebra_register *regs;
Zebra_mutex_cond session_lock;
struct zebra_session *sessions;
struct zebra_register *regs;
Zebra_mutex_cond session_lock;
@@
-289,6
+292,8
@@
struct zebra_session {
#endif
int shadow_enable;
#endif
int shadow_enable;
+ int m_staticrank;
+
zint records_inserted;
zint records_updated;
zint records_deleted;
zint records_inserted;
zint records_updated;
zint records_deleted;
@@
-328,7
+333,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, zint sysno);
+ int (*calc)(void *set_handle, zint sysno, zint staticrank);
void (*add)(void *set_handle, int seqno, TERMID term);
};
void (*add)(void *set_handle, int seqno, TERMID term);
};
@@
-414,9
+419,9
@@
void zebraRankDestroy (struct zebra_register *reg);
int att_getentbyatt(ZebraHandle zh, attent *res, oid_value set, int att,
const char *sattr);
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;
+extern struct rank_control *rank_1_class;
+extern struct rank_control *rank_zv_class;
+extern struct rank_control *rank_static_class;
int zebra_record_fetch (ZebraHandle zh, SYSNO sysno, int score,
zebra_snippets *hit_snippet, ODR stream,
int zebra_record_fetch (ZebraHandle zh, SYSNO sysno, int score,
zebra_snippets *hit_snippet, ODR stream,
@@
-474,9
+479,15
@@
ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname,
zint sysno, zebra_snippets *snippets);
void extract_flushRecordKeys (ZebraHandle zh, SYSNO sysno,
zint sysno, zebra_snippets *snippets);
void extract_flushRecordKeys (ZebraHandle zh, SYSNO sysno,
- int cmd, struct recKeys *reckeys);
+ int cmd, struct recKeys *reckeys,
+ zint staticrank);
+#if NATTR
+void extract_flushSortKeys (ZebraHandle zh, SYSNO sysno,
+ int cmd, struct recKeys *skp);
+#else
void extract_flushSortKeys (ZebraHandle zh, SYSNO sysno,
int cmd, struct sortKeys *skp);
void extract_flushSortKeys (ZebraHandle zh, SYSNO sysno,
int cmd, struct sortKeys *skp);
+#endif
void extract_schema_add (struct recExtractCtrl *p, Odr_oid *oid);
void extract_token_add (RecWord *p);
int explain_extract (void *handle, Record rec, data1_node *n);
void extract_schema_add (struct recExtractCtrl *p, Odr_oid *oid);
void extract_token_add (RecWord *p);
int explain_extract (void *handle, Record rec, data1_node *n);