]> mj.ucw.cz Git - libucw.git/commitdiff
Added indexing of URL words (partially ported from our old alter ego).
authorMartin Mares <mj@ucw.cz>
Fri, 30 Mar 2001 19:38:45 +0000 (19:38 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 30 Mar 2001 19:38:45 +0000 (19:38 +0000)
Robert, please ignore word types present in WORD_TYPES_HIDDEN when
searching for contexts -- URL's and other tricky stuff shouldn't show up.

lib/index.h

index 0fe46f6bb6a9f45e4a676e0198e58a9894d11722..f7ad7c9a1f1c0fd10c8f986e04958b289ae968b5 100644 (file)
@@ -21,13 +21,14 @@ enum word_type {
   WT_KEYWORD,                          /* Explicitly marked keyword */
   WT_META,                             /* Various meta-information */
   WT_ALT,                              /* Alternate texts for graphical elements */
+  WT_URL,                              /* Word extracted from document URL */
   WT_MAX
 };
 
 /* Descriptive names used for user output */
 #define WORD_TYPE_USER_NAMES                                                   \
    "reserved", "text", "emph", "small", "title", "hdr1", "hdr2", "keywd",      \
-   "meta", "alt", "type10", "type11", "type12", "type13", "type14", "type15"
+   "meta", "alt", "url", "type11", "type12", "type13", "type14", "type15"
 
 /* Keywords for word type names */
 #define WORD_TYPE_NAMES                                \
@@ -43,6 +44,9 @@ enum word_type {
        T(META, 1 << WT_META)                   \
        T(ALT, 1 << WT_ALT)
 
+/* These types are not shown in document contexts */
+#define WORD_TYPES_HIDDEN (1 << WT_URL)
+
 /* String types */
 
 enum string_type {