This question about Not sure...: Answered

Search logic - search for part of topic title

I have a topic titled DateTimeNotationInTheNewMillennium.

In the past, I was able to navigate to the topic easily by searching for 'millennium'.

But for some time, this no longer possible. So I suppose it's no longer possible to search for strings that are part of a topic title. When and/or how was this changed?
  • new in version 2.1.6?
  • NatSkin instead of PatternSkin?
  • some other reaseon?
Is there someone who knows more about the search logic of Foswiki?

Thanks in advance for any clarification!

-- 05 Nov 2019, StijnBousard

I was curious about this so did a test in the Sandbox web. I created a topic called DateTimeNotationInTheNewMillennium and then ran a test search. Seems to work OK to me. I also ran the same test on a private site of my own using NatSkin and got the same results. It found the topic using both lower and proper case of "Millennium".

The only configure setting I can think of checking is {Store}{SearchAlgorithm}. Do other searches appear to work ok? Have you check both apache and foswiki error logs for any related error messages? Not sure what else to suggest.

-- Main.LynnwoodBrown - 05 Nov 2019 - 17:18

I've also created the DateTime...Millennium topic on my own (local) sandbox, which uses the Patternskin. And guess what, the topic can be found by searching for 'millennium'.

My 'own' web in the same wiki, uses Natskin, and there, the same named topic isn't found.

However, I noticed that the URL differs: - PatternSkin: http://odin.explio.local/foswiki/bin/view/Sandbox/WebSearch?search=millennium&scope=all&web=Sandbox - NatSkin: http://odin.explio.local/foswiki/bin/view/Explio/WebSearch?search=millennium

Adding manually '&scope=all&web=Sandbox' to the search URL of the NatSkin web resulted in the topic to be found!

Where can I set/configure the NatSkin web to search the way the PatternSkin webs search?

-- StijnBousard - 07 Nov 2019

Try this patch to WebSearch
@@ -240,7 +241,7 @@ $percentINCLUDE{$quot%SYSTEMWEB%.%TOPIC%$quot section=$quotsearchfeed$quot}$perc
 }%%SEARCH{
        "%URLPARAM{"search" encode="entities, quote"}%" decode="entities"
        type="%URLPARAM{"type" default="word"}%"
-   scope="%URLPARAM{"scope" encode="safe, quote"}%"
+ scope="%URLPARAM{"scope" encode="safe, quote" default="all"}%"
        web="%URLPARAM{"web" encode="safe, quote"}%"%IF{
                "{EnableHierarchicalWebs}"
                then="recurse=\"%URLPARAM{"recurse" encode="safe, quote"}%\""
@@ -271,7 +272,7 @@ $percentINCLUDE{$quot%SYSTEMWEB%.%TOPIC%$quot section=$quotsearchfeed$quot}$perc
        "'%URLPARAM{"regex"}%'='on' OR '%URLPARAM{"type"}%'='regex'"
        then="regex"
        else="word"
-}%;excludetopic=%URLPARAM{"excludetopic" encode="url" default="%TOPIC%,%HOMETOPIC%,%STATISTICSTOPIC%"}%;web=%URLPARAM{"web" encode="url" default="%BASEWEB%"}%;recurse=%URLPARAM{"recurse" encode="url"}%;limit=%URLPARAM{"limit" encode="url" default="all"}%;scope=%URLPARAM{"scope" encode="url" default="text"}%;casesensitive=%URLPARAM{"casesensitive" encode="url" default="off"}%'>%MAKETEXT{"Get notified on changes on this search"}%</a>%ENDSECTION{"searchfeedlink"}%
+}%;excludetopic=%URLPARAM{"excludetopic" encode="url" default="%TOPIC%,%HOMETOPIC%,%STATISTICSTOPIC%"}%;web=%URLPARAM{"web" encode="url" default="%BASEWEB%"}%;recurse=%URLPARAM{"recurse" encode="url"}%;limit=%URLPARAM{"limit" encode="url" default="all"}%;scope=%URLPARAM{"scope" encode="url" default="all"}%;casesensitive=%URLPARAM{"casesensitive" encode="url" default="off"}%'>%MAKETEXT{"Get notified on changes on this search"}%</a>%ENDSECTION{"searchfeedlink"}%

This basically makes sure the scope parameter uses the same default value everywhere in the app.

-- Main.MichaelDaum - 08 Nov 2019

Thanks Michael, this is the perfect solution to my problem!

-- StijnBousard - 12 Nov 2019
 

QuestionForm edit

Subject Not sure...
Extension
Version Foswiki 2.1.6
Status Answered
Related Topics
Topic revision: r6 - 12 Nov 2019, StijnBousard
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy