]> mj.ucw.cz Git - libucw.git/blob - lib/index.h
f2b491601b3aa72381bdf52b0e4bc77ec02a7fb7
[libucw.git] / lib / index.h
1 /*
2  *      Sherlock Gatherer: Data structures used in indices
3  *
4  *      (c) 2001 Martin Mares <mj@ucw.cz>
5  */
6
7 /* Words */
8
9 #define MAX_WORD_LEN            64
10
11 /* Word types */
12
13 enum word_type {
14   WT_RESERVED,                          /* Reserved word type */
15   WT_TEXT,                              /* Ordinary text */
16   WT_EMPH,                              /* Emphasized text */
17   WT_SMALL,                             /* Small font */
18   WT_TITLE,                             /* Document title */
19   WT_SMALL_HEADING,                     /* Heading */
20   WT_BIG_HEADING,                       /* Larger heading */
21   WT_KEYWORD,                           /* Explicitly marked keyword */
22   WT_META,                              /* Various meta-information */
23   WT_ALT                                /* Alternate texts for graphical elements */
24 };
25
26 /* Index card attributes */
27
28 struct card_attr {
29   u32 card;                             /* Reference to card description (either oid or filepos) */
30   u32 site_id;
31   byte weight;
32   byte rfu[3];
33 };
34
35 /* String fingerprints */
36
37 struct fingerprint {
38   u32 hash[3];
39 };
40
41 void fingerprint(byte *string, struct fingerprint *fp);