1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

Add offical patch for stopwords in substr mode

This commit is contained in:
Andrey A. Chernov 2001-03-02 20:06:27 +00:00
parent 92c471f96a
commit 889e7b5d3e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38996
9 changed files with 78 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= mnogosearch
PORTVERSION= 3.1.11
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www databases
MASTER_SITES= http://search.mnogo.ru/Download/

View File

@ -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);

View File

@ -47,6 +47,7 @@ lib/libudmsearch-3.1.so
sbin/cachelogd
sbin/indexer
sbin/run-splitter
sbin/spelld
sbin/splitter
bin/udm-config
share/doc/mnogosearch/HTDB.txt

View File

@ -7,7 +7,7 @@
PORTNAME= mnogosearch
PORTVERSION= 3.1.11
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www databases
MASTER_SITES= http://search.mnogo.ru/Download/

View File

@ -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);

View File

@ -47,6 +47,7 @@ lib/libudmsearch-3.1.so
sbin/cachelogd
sbin/indexer
sbin/run-splitter
sbin/spelld
sbin/splitter
bin/udm-config
share/doc/mnogosearch/HTDB.txt

View File

@ -7,7 +7,7 @@
PORTNAME= mnogosearch
PORTVERSION= 3.1.11
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www databases
MASTER_SITES= http://search.mnogo.ru/Download/

View File

@ -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);

View File

@ -47,6 +47,7 @@ lib/libudmsearch-3.1.so
sbin/cachelogd
sbin/indexer
sbin/run-splitter
sbin/spelld
sbin/splitter
bin/udm-config
share/doc/mnogosearch/HTDB.txt