IDZEBRA  2.1.4
Go to the documentation of this file.
1 /* This file is part of the Zebra server.
2  Copyright (C) Index Data
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
21 #ifndef ZINFO_H
22 #define ZINFO_H
24 #include <d1_absyn.h>
25 #include <idzebra/api.h>
26 #include "recindex.h"
28 /* Compare string (ignore case) */
29 #ifdef WIN32
30 #define STRCASECMP stricmp
31 #else
32 #define STRCASECMP strcasecmp
33 #endif
37 typedef enum {
44 typedef ZEBRA_RES ZebraExplainUpdateFunc(void *handle,
45  Record drec,
46  data1_node *n);
49 typedef struct zebDatabaseInfo ZebDatabaseInfo;
50 ZebraExplainInfo zebraExplain_open(Records records, data1_handle dh,
51  Res res,
52  int writeFlag,
53  void *updateHandle,
56 void zebraExplain_close(ZebraExplainInfo zei);
57 int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database);
58 int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database,
59  int explain_database);
60 int zebraExplain_add_attr_su(ZebraExplainInfo zei, int index_type,
61  int set, int use);
71 int zebraExplain_lookup_attr_str(ZebraExplainInfo zei,
73  const char *index_type,
74  const char *str);
75 int zebraExplain_add_attr_str(ZebraExplainInfo zei,
77  const char *index_type,
78  const char *str);
79 void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid);
80 void zebraExplain_recordCountIncrement(ZebraExplainInfo zei, int adjust_num);
81 void zebraExplain_recordBytesIncrement(ZebraExplainInfo zei, int adjust_num);
82 zint zebraExplain_runNumberIncrement(ZebraExplainInfo zei, int adjust_num);
84 void zebraExplain_flush(ZebraExplainInfo zei, void *updateHandle);
86 int zebraExplain_lookup_ord(ZebraExplainInfo zei, int ord,
87  const char **index_type, const char **db,
88  const char **string_index);
90 int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord,
91  int term_delta, int doc_delta);
93 zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord);
94 zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord);
96 int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle,
97  int (*f)(void *handle, int ord,
98  const char *index_type,
99  const char *string_index,
102 int zebraExplain_get_database_ord(ZebraExplainInfo zei);
103 int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *updateHandle);
105 typedef struct {
110 } RecordAttr;
111 RecordAttr *rec_init_attr(ZebraExplainInfo zei, Record rec);
115 #endif
116 /*
117  * Local variables:
118  * c-basic-offset: 4
119  * c-file-style: "Stroustrup"
120  * indent-tabs-mode: nil
121  * End:
122  * vim: shiftwidth=4 tabstop=8 expandtab
123  */
zint zebraExplain_runNumberIncrement(ZebraExplainInfo zei, int adjust_num)
Definition: zinfo.c:1586
Zebra API.
off_t recordOffset
Definition: zinfo.h:107
zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord)
Definition: zinfo.c:1463
int recordSize
Definition: zinfo.h:106
void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid)
Definition: zinfo.c:1557
struct zebDatabaseInfo ZebDatabaseInfo
Definition: zinfo.h:49
int zebraExplain_lookup_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *str)
lookup ordinal from string index + index type
Definition: zinfo.c:1354
int zebraExplain_add_attr_su(ZebraExplainInfo zei, int index_type, int set, int use)
void zebraExplain_recordBytesIncrement(ZebraExplainInfo zei, int adjust_num)
Definition: zinfo.c:1564
int zebraExplain_get_database_ord(ZebraExplainInfo zei)
Definition: zinfo.c:1621
struct zebraExplainInfo * ZebraExplainInfo
Definition: zinfo.h:48
ZEBRA_RES ZebraExplainUpdateFunc(void *handle, Record drec, data1_node *n)
Definition: zinfo.h:44
zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord)
Definition: zinfo.c:1471
zint staticrank
Definition: zinfo.h:109
int zebraExplain_add_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *str)
Definition: zinfo.c:1546
Definition: res.c:46
int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database)
Definition: zinfo.c:791
int zebraExplain_lookup_ord(ZebraExplainInfo zei, int ord, const char **index_type, const char **db, const char **string_index)
Definition: zinfo.c:1479
void zebraExplain_close(ZebraExplainInfo zei)
Definition: zinfo.c:208
ZebraExplainInfo zebraExplain_open(Records records, data1_handle dh, Res res, int writeFlag, void *updateHandle, ZebraExplainUpdateFunc *)
Definition: zinfo.c:330
void zebraExplain_loadAttsets(data1_handle dh, Res res)
Definition: zinfo.c:1628
Definition: zinfo.h:37
zint runNumber
Definition: zinfo.h:108
long zint
Zebra integer.
Definition: util.h:66
void zebraExplain_flush(ZebraExplainInfo zei, void *updateHandle)
Definition: zinfo.c:167
int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord, int term_delta, int doc_delta)
Definition: zinfo.c:1436
int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *updateHandle)
Definition: zinfo.c:752
RecordAttr * rec_init_attr(ZebraExplainInfo zei, Record rec)
Definition: zinfo.c:1595
int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database, int explain_database)
Definition: zinfo.c:883
int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle, int(*f)(void *handle, int ord, const char *index_type, const char *string_index, zinfo_index_category_t cat))
Definition: zinfo.c:1381
Common return type for Zebra API.
Definition: util.h:80
void zebraExplain_recordCountIncrement(ZebraExplainInfo zei, int adjust_num)
Definition: zinfo.c:1575