Changeset 470 for trunk/gsdl/src/recpt/querytools.cpp
- Timestamp:
- 1999-08-25T16:47:55+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/querytools.cpp
r403 r470 12 12 /* 13 13 $Log$ 14 Revision 1.5 1999/08/25 04:47:55 sjboddie 15 added advanced search option - other minor changes 16 14 17 Revision 1.4 1999/07/19 00:16:58 sjboddie 15 18 no longer display documents that don't match all phrases in query string … … 45 48 OptionValue_t option; 46 49 text_t formattedstring = args["q"]; 47 50 format_querystring (formattedstring, args.getintarg("b")); 51 48 52 option.name = "Term"; 49 53 option.value = formattedstring; … … 87 91 88 92 text_t formattedstring2 = args["q2"]; 89 format_querystring (formattedstring2 );93 format_querystring (formattedstring2, args.getintarg("b")); 90 94 91 95 option.name = "Term"; … … 147 151 } 148 152 149 void format_querystring (text_t &querystring ) {153 void format_querystring (text_t &querystring, int querymode) { 150 154 text_t formattedstring; 151 155 … … 159 163 160 164 // want to remove ()|!& from querystring so boolean queries are just 161 // "all the words" queries 165 // "all the words" queries (unless querymode is advanced) 162 166 while (here != end) { 163 if ( *here == '(' || *here == ')' || *here == '|' ||164 *here == '!' || *here == '&') {167 if ((querymode == 0) && (*here == '(' || *here == ')' || *here == '|' || 168 *here == '!' || *here == '&')) { 165 169 formattedstring.push_back(' '); 166 170 } else {
Note:
See TracChangeset
for help on using the changeset viewer.