summaryrefslogtreecommitdiff
path: root/www/mnogosearch31/files/patch-stopw
blob: 44469a7c24db7b7fb95a36404c4fc47e49cb5527 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);