From 9ddf9b84308f16584183855435e614928136a0b9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 23 Jun 2002 20:32:19 +0000 Subject: [PATCH] Implemented merging of catalog attributes to the index. Just place the catalog dump to db/catalog.gz (e.g., by running utils/fetch-cat.sh) and run the indexer. Unfortunately, we've just filled up all the available word types :-( --- lib/custom.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/custom.h b/lib/custom.h index eedfe0b2..624a3667 100644 --- a/lib/custom.h +++ b/lib/custom.h @@ -21,13 +21,15 @@ enum word_type { WT_URL2, WT_FILE, /* Part of file name */ WT_LINK, /* Link text */ + WT_CAT_TITLE, /* Catalog title */ + WT_CAT_DESC, /* Catalog description */ WT_MAX }; /* Descriptive names used for user output */ #define WORD_TYPE_USER_NAMES \ "reserved", "text", "emph", "small", "title", "hdr1", "hdr2", "keywd", \ - "meta", "alt", "urlword1", "urlword2", "nameword", "link", "type14", "type15" + "meta", "alt", "urlword1", "urlword2", "nameword", "link", "ctitle", "cdesc" /* Keywords for word type names */ #define WORD_TYPE_NAMES \ @@ -44,11 +46,17 @@ enum word_type { T(ALT, 1 << WT_ALT) \ T(URLWORD, (1 << WT_URL1) | (1 << WT_URL2)) \ T(FILE, 1 << WT_FILE) \ - T(LINK, 1 << WT_LINK) + T(LINK, 1 << WT_LINK) \ + T(CTITLE, 1 << WT_CAT_TITLE) \ + T(CDESC, 1 << WT_CAT_DESC) /* These types are not shown in document contexts */ #define WORD_TYPES_HIDDEN ((1 << WT_URL1) | (1 << WT_URL2) | (1 << WT_FILE)) +/* These types are separated out when printing contexts */ +#define WORD_TYPES_META (WORD_TYPES_HIDDEN | (1 << WT_TITLE) | (1 << WT_KEYWORD) | \ + (1 << WT_META) | (1 << WT_CAT_TITLE) | (1 << WT_CAT_DESC)) + /* These types are always matched without accents if accent mode is set to "auto" */ #define WORD_TYPES_NO_AUTO_ACCENT ((1 << WT_URL1) | (1 << WT_URL2) | (1 << WT_FILE) | (1 << WT_LINK)) -- 2.39.2