1 /* $Id: zinfo.h,v 1.36 2006-08-14 10:40:15 adam Exp $
2 Copyright (C) 1995-2006
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 #include <idzebra/api.h>
31 /* Compare string (ignore case) */
33 #define STRCASECMP stricmp
35 #define STRCASECMP strcasecmp
41 zinfo_index_category_index,
42 zinfo_index_category_sort,
43 zinfo_index_category_alwaysmatches,
44 zinfo_index_category_anchor
45 } zinfo_index_category_t;
47 typedef ZEBRA_RES ZebraExplainUpdateFunc(void *handle,
51 typedef struct zebraExplainInfo *ZebraExplainInfo;
52 typedef struct zebDatabaseInfo ZebDatabaseInfo;
53 ZebraExplainInfo zebraExplain_open(Records records, data1_handle dh,
57 ZebraExplainUpdateFunc *);
59 void zebraExplain_close (ZebraExplainInfo zei);
60 int zebraExplain_curDatabase (ZebraExplainInfo zei, const char *database);
61 int zebraExplain_newDatabase (ZebraExplainInfo zei, const char *database,
62 int explain_database);
63 int zebraExplain_add_attr_su(ZebraExplainInfo zei, int index_type,
65 int zebraExplain_lookup_attr_str(ZebraExplainInfo zei,
66 zinfo_index_category_t cat,
69 int zebraExplain_add_attr_str(ZebraExplainInfo zei,
70 zinfo_index_category_t cat,
73 void zebraExplain_addSchema (ZebraExplainInfo zei, Odr_oid *oid);
74 void zebraExplain_recordCountIncrement (ZebraExplainInfo zei, int adjust_num);
75 void zebraExplain_recordBytesIncrement (ZebraExplainInfo zei, int adjust_num);
76 zint zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num);
77 void zebraExplain_loadAttsets (data1_handle dh, Res res);
78 void zebraExplain_flush (ZebraExplainInfo zei, void *updateHandle);
80 int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord,
81 int *index_type, const char **db,
82 const char **string_index);
84 int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord,
85 int term_delta, int doc_delta);
87 zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord);
88 zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord);
90 int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle,
91 int (*f)(void *handle, int ord));
93 int zebraExplain_get_database_ord(ZebraExplainInfo zei);
94 int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *updateHandle);
102 RecordAttr *rec_init_attr (ZebraExplainInfo zei, Record rec);
110 * indent-tabs-mode: nil
112 * vim: shiftwidth=4 tabstop=8 expandtab