2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.17 1995-12-08 16:22:57 adam
8 * Work on update while servers are running. Three lock files introduced.
9 * The servers reload their registers when necessary, but they don't
10 * reestablish result sets yet.
12 * Revision 1.16 1995/12/07 17:38:48 adam
13 * Work locking mechanisms for concurrent updates/commit.
15 * Revision 1.15 1995/11/21 15:29:13 adam
16 * Config file 'base' read by default by both indexer and server.
18 * Revision 1.14 1995/11/16 17:00:57 adam
19 * Better logging of rpn query.
21 * Revision 1.13 1995/11/16 15:34:56 adam
22 * Uses new record management system in both indexer and server.
24 * Revision 1.12 1995/10/27 14:00:12 adam
25 * Implemented detection of database availability.
27 * Revision 1.11 1995/10/17 18:02:12 adam
28 * New feature: databases. Implemented as prefix to words in dictionary.
30 * Revision 1.10 1995/10/09 16:18:38 adam
31 * Function dict_lookup_grep got extra client data parameter.
33 * Revision 1.9 1995/10/06 14:38:01 adam
34 * New result set method: r_score.
35 * Local no (sysno) and score is transferred to retrieveCtrl.
37 * Revision 1.8 1995/10/06 13:52:06 adam
38 * Bug fixes. Handler may abort further scanning.
40 * Revision 1.7 1995/10/06 10:43:57 adam
41 * Scan added. 'occurrences' in scan entries not set yet.
43 * Revision 1.6 1995/09/28 09:19:48 adam
44 * xfree/xmalloc used everywhere.
45 * Extract/retrieve method seems to work for text records.
47 * Revision 1.5 1995/09/27 16:17:32 adam
48 * More work on retrieve.
50 * Revision 1.4 1995/09/14 11:53:28 adam
51 * First work on regular expressions/truncations.
53 * Revision 1.3 1995/09/08 08:53:23 adam
54 * Record buffer maintained in server_info.
56 * Revision 1.2 1995/09/06 16:11:19 adam
57 * Option: only one word key per file.
59 * Revision 1.1 1995/09/05 15:28:40 adam
60 * More work on search engine.
75 typedef struct ZServerSet_ {
79 struct ZServerSet_ *next;
83 int registerState; /* 0 (no commit pages), 1 (use commit pages) */
84 time_t registerChange;
94 int rpn_search (ZServerInfo *zi,
95 Z_RPNQuery *rpn, int num_bases, char **basenames,
96 const char *setname, int *hits);
98 int rpn_scan (ZServerInfo *zi, Z_AttributesPlusTerm *zapt,
99 int num_bases, char **basenames,
100 int *position, int *num_entries, struct scan_entry **list,
103 ZServerSet *resultSetAdd (ZServerInfo *zi, const char *name,
105 ZServerSet *resultSetGet (ZServerInfo *zi, const char *name);
106 ZServerSetSysno *resultSetSysnoGet (ZServerInfo *zi, const char *name,
107 int num, int *positions);
108 void resultSetSysnoDel (ZServerInfo *zi, ZServerSetSysno *records, int num);
109 void zlog_rpn (Z_RPNQuery *rpn);
111 int zebraServerLock (int lockCommit);
112 void zebraServerUnlock (int commitPhase);
113 int zebraServerLockGetState (time_t *timep);