diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-02 20:06:27 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-02 20:06:27 +0000 |
commit | 889e7b5d3e7234ad9e0b3c5e3945840e8e7b3149 (patch) | |
tree | f2001e842cc46497b9d3e5eb937b4b9ea7f18f4a /www/mnogosearch31/files/patch-stopw | |
parent | add opencl, a portable, easy to use, and efficient C++ crypto library (diff) |
Add offical patch for stopwords in substr mode
Notes
Notes:
svn path=/head/; revision=38996
Diffstat (limited to 'www/mnogosearch31/files/patch-stopw')
-rw-r--r-- | www/mnogosearch31/files/patch-stopw | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/www/mnogosearch31/files/patch-stopw b/www/mnogosearch31/files/patch-stopw new file mode 100644 index 000000000000..44469a7c24db --- /dev/null +++ b/www/mnogosearch31/files/patch-stopw @@ -0,0 +1,24 @@ +--- src/searchtool.c.orig Fri Feb 16 19:12:22 2001 ++++ src/searchtool.c Thu Mar 1 16:22:54 2001 +@@ -251,11 +251,16 @@ + continue; + } + len=strlen(rw); +- if(UdmIsStopWord(query->Conf,rw)||(query->Conf->min_word_len>len)||(query->Conf->max_word_len<len)){ +- if(query->wordinfo[0])strcat(query->wordinfo,", "); +- sprintf(UDM_STREND(query->wordinfo)," %s :stopword",rw); +- lex=UdmGetLex(&w,&lasttok,query->charset); +- continue; ++ ++ if(query->word_match==UDM_MATCH_WORD){ ++ /* Check stopword only when full word */ ++ /* Substring searches should not exclude them */ ++ if(UdmIsStopWord(query->Conf,rw)||(query->Conf->min_word_len>len)||(query->Conf->max_word_len<len)){ ++ if(query->wordinfo[0])strcat(query->wordinfo,", "); ++ sprintf(UDM_STREND(query->wordinfo)," %s :stopword",rw); ++ lex=UdmGetLex(&w,&lasttok,query->charset); ++ continue; ++ } + } + if(query->words_in_query<UDM_MAXWORDPERQUERY-1){ + query->words[query->words_in_query]=strdup(rw); |