IDZEBRA 2.2.8
zinfo.h
Go to the documentation of this file.
1/* This file is part of the Zebra server.
2 Copyright (C) Index Data
3
4Zebra is free software; you can redistribute it and/or modify it under
5the terms of the GNU General Public License as published by the Free
6Software Foundation; either version 2, or (at your option) any later
7version.
8
9Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10WARRANTY; without even the implied warranty of MERCHANTABILITY or
11FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18*/
19
20
21#ifndef ZINFO_H
22#define ZINFO_H
23
24#include <d1_absyn.h>
25#include <idzebra/api.h>
26#include "recindex.h"
27
28/* Compare string (ignore case) */
29#ifdef WIN32
30#define STRCASECMP stricmp
31#else
32#define STRCASECMP strcasecmp
33#endif
34
35YAZ_BEGIN_CDECL
36
43
44typedef ZEBRA_RES ZebraExplainUpdateFunc(void *handle,
45 Record drec,
46 data1_node *n);
47
49typedef struct zebDatabaseInfo ZebDatabaseInfo;
51 Res res,
52 int writeFlag,
53 void *updateHandle,
55
57int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database);
58int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database,
59 int explain_database);
61 int set, int use);
62
73 const char *index_type,
74 const char *str);
77 const char *index_type,
78 const char *str);
79void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid);
84void zebraExplain_flush(ZebraExplainInfo zei, void *updateHandle);
85
87 const char **index_type, const char **db,
88 const char **string_index);
89
91 int term_delta, int doc_delta);
92
95
96int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle,
97 int (*f)(void *handle, int ord,
98 const char *index_type,
99 const char *string_index,
101
103int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *updateHandle);
104
112
113YAZ_END_CDECL
114
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 */
124
Zebra API.
off_t recordOffset
Definition zinfo.h:107
zint runNumber
Definition zinfo.h:108
int recordSize
Definition zinfo.h:106
zint staticrank
Definition zinfo.h:109
long zint
Zebra integer.
Definition util.h:66
short ZEBRA_RES
Common return type for Zebra API.
Definition util.h:80
ZebraExplainInfo zebraExplain_open(Records records, data1_handle dh, Res res, int writeFlag, void *updateHandle, ZebraExplainUpdateFunc *)
Definition zinfo.c:331
void zebraExplain_loadAttsets(data1_handle dh, Res res)
Definition zinfo.c:1627
RecordAttr * rec_init_attr(ZebraExplainInfo zei, Record rec)
Definition zinfo.c:1594
int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database)
Definition zinfo.c:790
ZEBRA_RES ZebraExplainUpdateFunc(void *handle, Record drec, data1_node *n)
Definition zinfo.h:44
void zebraExplain_recordBytesIncrement(ZebraExplainInfo zei, int adjust_num)
Definition zinfo.c:1563
zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord)
Definition zinfo.c:1470
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:1353
struct zebraExplainInfo * ZebraExplainInfo
Definition zinfo.h:48
int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *updateHandle)
Definition zinfo.c:751
void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid)
Definition zinfo.c:1556
void zebraExplain_recordCountIncrement(ZebraExplainInfo zei, int adjust_num)
Definition zinfo.c:1574
zinfo_index_category_t
Definition zinfo.h:37
@ zinfo_index_category_index
Definition zinfo.h:38
@ zinfo_index_category_alwaysmatches
Definition zinfo.h:40
@ zinfo_index_category_sort
Definition zinfo.h:39
@ zinfo_index_category_anchor
Definition zinfo.h:41
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:1380
zint zebraExplain_runNumberIncrement(ZebraExplainInfo zei, int adjust_num)
Definition zinfo.c:1585
int zebraExplain_add_attr_su(ZebraExplainInfo zei, int index_type, int set, int use)
int zebraExplain_get_database_ord(ZebraExplainInfo zei)
Definition zinfo.c:1620
int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord, int term_delta, int doc_delta)
Definition zinfo.c:1435
void zebraExplain_flush(ZebraExplainInfo zei, void *updateHandle)
Definition zinfo.c:168
void zebraExplain_close(ZebraExplainInfo zei)
Definition zinfo.c:209
int zebraExplain_add_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *str)
Definition zinfo.c:1545
int zebraExplain_lookup_ord(ZebraExplainInfo zei, int ord, const char **index_type, const char **db, const char **string_index)
Definition zinfo.c:1478
zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord)
Definition zinfo.c:1462
int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database, int explain_database)
Definition zinfo.c:882
struct zebDatabaseInfo ZebDatabaseInfo
Definition zinfo.h:49