Item1908: Experiments with System.WebSearchAdvanced
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
I have experienced a few curious effects in WebSearchAdvanced.
(Besides the fact that the radiobutton "Literal search" at "Make search" is translated to "Wort suche" in german and this is near to type="word",)
if you call this topic the first time and search, you get results. If you click on the Search-button again, you get more results. If you choose "literal", you get other results.
Demonstration:
I created three topics:
The first one I called
Test1SOAP, the content is
SOAP WSDL "web service"
The second one I called
Test2Soapsud, the content is
soapsud WSDL "web service"
The third one I called
Test3Shampoo, the content is
SOAP soapsud WSDL "web service" shampoo
Further there is an old
WebSearchTagsPlugin topic, remained from tests, and my docu named WebSearchAdvancedBugs.
The preferences for
SEARCH are:
- SEARCHDEFAULTTTYPE: Default search type for search forms which calls the search script
- SEARCHVARDEFAULTTYPE: Default search type for %SEARCH{} macro
- SEARCHSTOPWORDS: List of stop words (common words and characters to exclude from a keyword search)
- Currently a, all, am, an, and, any, as, at, b, be, by, c, d, e, for, from, g, h, how, i, i'm, i.e., in, is, isn't, it, it's, its, j, k, l, m, n, o, of, on, or, p, q, r, s, t, that, that's, the, this, to, u, v, w, was, wasn't, what, what's, when, where, who, who's, will, with, x, y, z
The foswiki version is Foswiki-1.0.6, Sun, 21 Jun 2009, build 4272.
First search
I go to AdvancedWebSearch by selecting "Advanced search" in the topic WebSearch without entering any data in the form.
Searching for
soap wsdl "web service" -shampoo
I get the following result:
- Screenshot 1: searching for the first time:
While the %SEARCH-macro helper displays
%SEARCH{
"soap wsdl \"web service\" -shampoo"
type="word"
order="topic"
limit="all"
zeroresults="on"
}%
and the URL is expanded by
?search=soap+wsdl+"web+service"+-shampoo&order=topic&type=word&limit=all .
Second search
I simply click again on the Search-button and get the following result:
- Screenshot 2: searching the second time:
While the %SEARCH-macro helper displays
%SEARCH{
"soap wsdl \"web service\" -shampoo"
type="word"
scope="all"
order="topic"
limit="all"
zeroresults="on"
}%
and the URL is expanded by
?search=soap+wsdl+"web+service"+-shampoo&scope=all&order=topic&type=word&limit=all .
Third search
I select "Literal search" and get:
- Screenshot 3: searching with literal search ("Wort Suche"):
While the %SEARCH-macro helper displays
%SEARCH{
"soap wsdl \"web service\" -shampoo"
type="literal"
scope="all"
order="topic"
limit="all"
zeroresults="on"
}%
and the URL is expanded by
?search=soap+wsdl+"web+service"+-shampoo&scope=all&order=topic&type=literal&limit=all .
Questions and answers
First search
Obviously the scope is not set, the default is "text" - and with the word search you do not find "soapsud" if you search for "SOAP". But in
VarSEARCH I find the sentence to word search:
"word: identical to keyword but searches whole words: topics with "soapsuds" will not be found, and topics with "shampoos" will not be excluded." (I note the plural form "shampoos" - if this is intention, it's confusing.)
Why I got the topic Test3Shampoo not in the search hits? What is with the search parameter -shampoo at type="word"?
Second search
The scope is set to "all", but it is a word search. "soapsud" cannot be the search hit. I renamed the topic Test2Soapsud to Test2Sud, and the effect was not reproduceable.
That means, a type="word"-Search includes a type="keyword"-Search on topic names if scope="all" is set. This is a practical implication, but not documented. I renamed Test2Sud to Test2SudsoapXXX, and there it is in the search hits again.
Third search
If you search for the exact string "soap wsdl "web service" -shampoo", then it will only appear in this docu and in the test-topic. All ok, just confusing for the intermediate user. ("There is a minus sign, it has to exclude topics with shampoo..." - training, training, training....).
This type searches not for whole words, but for the existence of the exact string in the topic, therefore the name "literal" is a little misleading if one is focused on words - but this I cannot estimate, I am not a naturally english speaker. I suggest to have the translation for "literal search" to "exakte Suche nach einer Zeichenfolge" in german, this would help a bit
Also the name "Topic name" for type="word" is misleading, so is the german translation ("Topic Name"). I f would like to search only the topic name, then I will select scope="topic" ("Topic title"). I propose to change the label to "Word search" and to document the section "Make search" in SearchHelp.
Keyword search
There is no possibility to select type="keyword", what we will use most (we will customize this topic and have backups
). Excluding the checkbox for bookview="on" was a good decision, but the type parameter "keyword" would be not too expensive to implement and completes the range.
--
WolfgangRaus - 09 Aug 2009
Closing this. Search has been very significantly rewritten over the years. No activity on this task and it probably doesn't apply.
--
GeorgeClark - 08 Jan 2015