8 #include <yaz/comstack.h>
9 #include <yaz/pquery.h>
11 #include <yaz/yaz-ccl.h>
12 #include "termlists.h"
13 #include "relevance.h"
16 #define MAX_DATABASES 512
19 struct client *client;
25 int *term_frequency_vec;
26 struct record *next_cluster;
31 // Represents a host (irrespective of databases)
35 struct connection *connections; // All connections to this
39 // Represents a (virtual) database on a host
43 char databases[MAX_DATABASES][128];
45 struct database *next;
50 // Represents a physical, reusable connection to a remote Z39.50 host
55 struct client *client;
63 struct connection *next;
66 // Represents client state for a connection to one search target
68 struct database *database;
69 struct connection *connection;
70 struct session *session;
74 int requestid; // ID of current outstanding request
94 struct client *clients;
97 NMEM nmem; // Nmem for each operation (i.e. search)
98 WRBUF wrbuf; // Wrbuf for scratch(i.e. search)
99 struct termlist *termlist;
100 struct relevance *relevance;
101 struct reclist *reclist;
108 int num_no_connection;
110 int num_initializing;
120 struct hitsbytarget {
130 int timeout; /* operations timeout, in seconds */
131 char implementationId[128];
132 char implementationName[128];
133 char implementationVersion[128];
134 int target_timeout; // seconds
138 CCL_bibset ccl_filter;
144 struct hitsbytarget *hitsbytarget(struct session *s, int *count);
145 int select_targets(struct session *se);
146 struct session *new_session();
147 void destroy_session(struct session *s);
148 int load_targets(struct session *s, const char *fn);
149 void statistics(struct session *s, struct statistics *stat);
150 char *search(struct session *s, char *query);
151 struct record **show(struct session *s, int start, int *num, int *total, int *sumhits);
152 struct termlist_score **termlist(struct session *s, int *num);
159 * indent-tabs-mode: nil
161 * vim: shiftwidth=4 tabstop=8 expandtab