*** pgsql/contrib/tsearch2/Attic/wparser_def.c 2008/10/17 17:41:16 1.13.2.1 --- pgsql/contrib/tsearch2/Attic/wparser_def.c 2009/01/15 18:04:42 1.13.2.2 *************** prsd_end(PG_FUNCTION_ARGS) *** 72,82 **** #define COMPLEXTOKEN(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 ) #define ENDPUNCTOKEN(x) ( (x)==12 ) - #define TS_IDIGNORE(x) ( (x)==13 || (x)==14 || (x)==12 || (x)==23 ) ! #define HLIDIGNORE(x) ( (x)==5 || (x)==13 || (x)==15 || (x)==16 || (x)==17 ) #define HTMLHLIDIGNORE(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 ) ! #define NONWORDTOKEN(x) ( (x)==12 || HLIDIGNORE(x) ) #define NOENDTOKEN(x) ( NONWORDTOKEN(x) || (x)==7 || (x)==8 || (x)==20 || (x)==21 || (x)==22 || TS_IDIGNORE(x) ) typedef struct --- 72,82 ---- #define COMPLEXTOKEN(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 ) #define ENDPUNCTOKEN(x) ( (x)==12 ) #define TS_IDIGNORE(x) ( (x)==13 || (x)==14 || (x)==12 || (x)==23 ) ! #define HLIDREPLACE(x) ( (x)==13 ) ! #define HLIDSKIP(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 ) #define HTMLHLIDIGNORE(x) ( (x)==5 || (x)==15 || (x)==16 || (x)==17 ) ! #define NONWORDTOKEN(x) ( (x)==12 || HLIDREPLACE(x) || HLIDSKIP(x) ) #define NOENDTOKEN(x) ( NONWORDTOKEN(x) || (x)==7 || (x)==8 || (x)==20 || (x)==21 || (x)==22 || TS_IDIGNORE(x) ) typedef struct *************** prsd_headline(PG_FUNCTION_ARGS) *** 364,376 **** prs->words[i].selected = 1; if (highlight == 0) { ! if (HLIDIGNORE(prs->words[i].type)) prs->words[i].replace = 1; } else { if (HTMLHLIDIGNORE(prs->words[i].type)) ! prs->words[i].replace = 1; } prs->words[i].in = (prs->words[i].repeated) ? 0 : 1; --- 364,378 ---- prs->words[i].selected = 1; if (highlight == 0) { ! if (HLIDREPLACE(prs->words[i].type)) prs->words[i].replace = 1; + else if (HLIDSKIP(prs->words[i].type)) + prs->words[i].skip = 1; } else { if (HTMLHLIDIGNORE(prs->words[i].type)) ! prs->words[i].skip = 1; } prs->words[i].in = (prs->words[i].repeated) ? 0 : 1;