Feature Proposal: Document two important parameters for Foswiki::Func::query


Make sure that the option names do not change in future

Description and Documentation

In connection with MultiSearchPlugin I found that the available options for Foswiki::Func::query was very limited and I missed options related to which topics to search. It turns out that they are fully and well supported. Just not documented.


Here is an example code where the two options make sense

my $matches = Foswiki::Func::query( "$multiSearchStrings[$i]", undef,
                                         { web => $paramWeb,
                                           casesensitive => 0,
                                           files_without_match => 0,
                                           type => 'query',
                                           includeTopics => $includeTopics, #undocumented
                                           excludeTopics => $excludeTopics, #undocumented


There is no code impact. This already works in 1.1 and 2.0. It is just not documented in the documenation. Several options are listed. I suggest adding includeTopics and excludeTopics as they are vital to having a good performance when calling the function in a plugin. The alternative is that the plugin has to create a list making an additional search OR adding the condition to the query. Both ways are much slower.



I will naturally add the two lines of documentation to the Foswiki/Func.pm file. It is just a matter of specifying includeTopics and excludeTopics.

-- Contributors: KennethLavrsen - 19 Aug 2015


Topic revision: r4 - 09 Sep 2015, GeorgeClark - This page was cached on 22 Sep 2021 - 22:32.

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