8 #include <yaz/comstack.h>
9 #include <yaz/pquery.h>
10 #include "termlists.h"
11 #include "relevance.h"
14 #define MAX_DATABASES 512
17 struct client *client;
23 int *term_frequency_vec;
24 struct record *next_cluster;
29 // Represents a host (irrespective of databases)
33 struct connection *connections; // All connections to this
37 // Represents a (virtual) database on a host
41 char databases[MAX_DATABASES][128];
43 struct database *next;
48 // Represents a physical, reusable connection to a remote Z39.50 host
53 struct client *client;
61 struct connection *next;
64 // Represents client state for a connection to one search target
66 struct database *database;
67 struct connection *connection;
68 struct session *session;
72 int requestid; // ID of current outstanding request
92 struct client *clients;
95 NMEM nmem; // Nmem for each operation (i.e. search)
96 WRBUF wrbuf; // Wrbuf for scratch(i.e. search)
97 struct termlist *termlist;
98 struct relevance *relevance;
99 struct reclist *reclist;
106 int num_no_connection;
108 int num_initializing;
118 struct hitsbytarget {
127 struct hitsbytarget *hitsbytarget(struct session *s, int *count);
128 int select_targets(struct session *se);
129 struct session *new_session();
130 void session_destroy(struct session *s);
131 int load_targets(struct session *s, const char *fn);
132 void statistics(struct session *s, struct statistics *stat);
133 char *search(struct session *s, char *query);
134 struct record **show(struct session *s, int start, int *num, int *total, int *sumhits);
135 struct termlist_score **termlist(struct session *s, int *num);
142 * indent-tabs-mode: nil
144 * vim: shiftwidth=4 tabstop=8 expandtab