IDZEBRA 2.2.8
rank.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#ifndef RANK_H
21#define RANK_H
22
23#include <idzebra/api.h>
24
25YAZ_BEGIN_CDECL
26
28 char *name;
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?)
38 */
39 void (*end)(struct zebra_register *reg, void *set_handle);
40 int (*calc)(void *set_handle, zint sysno, zint staticrank,
41 int *stop_flag);
42 void (*add)(void *set_handle, int seqno, TERMID term);
43};
44
45void zebraRankInstall (struct zebra_register *reg, struct rank_control *ctrl);
47void zebraRankDestroy (struct zebra_register *reg);
48
49/* declaring externally defined rank class structures */
50/* remember to install rank classes in zebraapi.c as well!! */
51extern struct rank_control *rank_1_class;
52extern struct rank_control *rank_2_class;
53extern struct rank_control *rank_zv_class;
54extern struct rank_control *rank_static_class;
56
57
58
59YAZ_END_CDECL
60
61#endif
62/*
63 * Local variables:
64 * c-basic-offset: 4
65 * c-file-style: "Stroustrup"
66 * indent-tabs-mode: nil
67 * End:
68 * vim: shiftwidth=4 tabstop=8 expandtab
69 */
70
Zebra API.
void zebraRankInstall(struct zebra_register *reg, struct rank_control *ctrl)
Definition zsets.c:1207
void zebraRankDestroy(struct zebra_register *reg)
Definition zsets.c:1218
struct rank_control * rank_static_class
Definition rankstatic.c:185
ZebraRankClass zebraRankLookup(ZebraHandle zh, const char *name)
Definition zsets.c:1193
struct rank_control * rank_zv_class
struct rank_control * rank_similarity_class
struct rank_control * rank_2_class
Definition rank1.c:266
struct rank_control * rank_1_class
Definition rank1.c:254
void(* end)(struct zebra_register *reg, void *set_handle)
Definition rank.h:39
int(* calc)(void *set_handle, zint sysno, zint staticrank, int *stop_flag)
Definition rank.h:40
void(* destroy)(struct zebra_register *reg, void *class_handle)
Definition rank.h:30
void(* add)(void *set_handle, int seqno, TERMID term)
Definition rank.h:42
char * name
Definition rank.h:28
Definition rset.h:151
char * name
Definition index.h:127
long zint
Zebra integer.
Definition util.h:66