Option: only one word key per file.
[idzebra-moved-to-github.git] / index / zserver.h
1 /*
2  * Copyright (C) 1994-1995, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: zserver.h,v $
7  * Revision 1.2  1995-09-06 16:11:19  adam
8  * Option: only one word key per file.
9  *
10  * Revision 1.1  1995/09/05  15:28:40  adam
11  * More work on search engine.
12  *
13  */
14
15 #include "index.h"
16 #include <proto.h>
17 #include <rset.h>
18
19 typedef struct {
20     size_t size;
21     char *buf;
22 } ZServerRecord;
23
24 typedef struct ZServerSet_ {
25     char *name;
26     RSET rset;
27     int size;
28     struct ZServerSet_ *next;
29 } ZServerSet;
30    
31 typedef struct {
32     ZServerSet *sets;
33     Dict wordDict;
34     ISAM wordIsam;
35     Dict fileDict;
36     int sys_idx_fd;
37 } ZServerInfo;
38
39 int rpn_search (ZServerInfo *zi, 
40                 Z_RPNQuery *rpn, int num_bases, char **basenames, 
41                 const char *setname, int *hits);
42
43 ZServerSet *resultSetAdd (ZServerInfo *zi, const char *name,
44                           int ov, RSET rset);
45 ZServerSet *resultSetGet (ZServerInfo *zi, const char *name);
46 ZServerRecord *resultSetRecordGet (ZServerInfo *zi, const char *name,
47                                    int num, int *positions);
48 void resultSetRecordDel (ZServerInfo *zi, ZServerRecord *records, int num);