]> mj.ucw.cz Git - libucw.git/commitdiff
Implemented merging of catalog attributes to the index. Just place the
authorMartin Mares <mj@ucw.cz>
Sun, 23 Jun 2002 20:32:19 +0000 (20:32 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 23 Jun 2002 20:32:19 +0000 (20:32 +0000)
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

index eedfe0b2b9c27b374d6b7e3404922b097cea8c22..624a366770c395a302790988379dcaeb613bff5b 100644 (file)
@@ -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))