1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2011 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
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
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
23 #include <idzebra/api.h>
29 void *(*create)(ZebraHandle zh);
30 void (*destroy)(struct zebra_register *reg, void *class_handle);
31 void *(*begin)(struct zebra_register *reg,
32 void *class_handle, RSET rset, NMEM nmem,
33 TERMID *terms, int numterms);
34 /* ### Could add parameters to begin:
35 * char *index; // author, title, etc.
36 * int dbsize; // number of records in database
37 * int rssize; // number of records in result set (estimate?)
39 void (*end)(struct zebra_register *reg, void *set_handle);
40 int (*calc)(void *set_handle, zint sysno, zint staticrank,
42 void (*add)(void *set_handle, int seqno, TERMID term);
45 void zebraRankInstall (struct zebra_register *reg, struct rank_control *ctrl);
46 ZebraRankClass zebraRankLookup (ZebraHandle zh, const char *name);
47 void zebraRankDestroy (struct zebra_register *reg);
49 /* declaring externally defined rank class structures */
50 /* remember to install rank classes in zebraapi.c as well!! */
51 extern struct rank_control *rank_1_class;
52 extern struct rank_control *rank_2_class;
53 extern struct rank_control *rank_zv_class;
54 extern struct rank_control *rank_static_class;
55 extern struct rank_control *rank_similarity_class;
65 * c-file-style: "Stroustrup"
66 * indent-tabs-mode: nil
68 * vim: shiftwidth=4 tabstop=8 expandtab