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