1 /* $Id: rank.h,v 1.1 2006-05-03 09:31:26 marc Exp $
2 Copyright (C) 1995-2005
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 Zebra; see the file LICENSE.zebra. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 #include <idzebra/api.h>
32 void *(*create)(ZebraHandle zh);
33 void (*destroy)(struct zebra_register *reg, void *class_handle);
34 void *(*begin)(struct zebra_register *reg,
35 void *class_handle, RSET rset, NMEM nmem,
36 TERMID *terms, int numterms);
37 /* ### Could add parameters to begin:
38 * char *index; // author, title, etc.
39 * int dbsize; // number of records in database
40 * int rssize; // number of records in result set (estimate?)
42 void (*end)(struct zebra_register *reg, void *set_handle);
43 int (*calc)(void *set_handle, zint sysno, zint staticrank,
45 void (*add)(void *set_handle, int seqno, TERMID term);
48 void zebraRankInstall (struct zebra_register *reg, struct rank_control *ctrl);
49 ZebraRankClass zebraRankLookup (ZebraHandle zh, const char *name);
50 void zebraRankDestroy (struct zebra_register *reg);
52 /* declaring externally defined rank class structures */
53 /* remember to install rank classes in zebraapi.c as well!! */
54 extern struct rank_control *rank_1_class;
55 extern struct rank_control *rank_zv_class;
56 extern struct rank_control *rank_static_class;
57 extern struct rank_control *rank_similarity_class;