Item12585: Missing configuration of {files_without_match} parameter/option in Search.pm
Priority: Urgent
Current State: Closed
Released In: 1.1.9
Target Release: patch
Applies To: Engine
Component: SEARCH
Branches: Release01x01 trunk
--
ChristianKoehn - 18 Sep 2013
Hi,
Using the search it may happen that the {files_without_match} option/parameter used in the search engine (Native/Fork etc.) is not properly set.
This result e.g. for
WebRss searches in processing each line of all topics instead of only one time per topic.
Proposed fix by
CrawfordCurrie:
[11:46] <@CDot> Index: Search.pm
[11:46] <@CDot> ===================================================================
[11:46] <@CDot> --- Search.pm (revision 16728)
[11:46] <@CDot> +++ Search.pm (working copy)
[11:46] <@CDot> @@ -253,6 +253,7 @@
[11:46] <@CDot> my $format = $params{format};
[11:46] <@CDot>
[11:46] <@CDot> $params{multiple} = Foswiki::isTrue( $params{multiple} );
[11:46] <@CDot> + $params{files_without_match} = not $params{multiple};
[11:46] <@CDot> $params{nonoise} = Foswiki::isTrue( $params{nonoise} );
[11:46] <@CDot> $params{noempty} = Foswiki::isTrue( $params{noempty}, $params{nonoise} );
[11:46] <@CDot> ### $params{zeroresults} = Foswiki::isTrue( ( $params{zeroresults} ), $params{nonoise} );
Regards,
Christian
The problem seems to be a result of the refactoring Sven did for result sets. That passes the responsibility for multiple="on" to the result formatter, but the passing of
files_without_match
is necessary to stop a huge memory blob from forming during the basic search. Arguably this fix should be in the search algorithm (and
NativeSearchContrib)
--
CrawfordCurrie - 18 Sep 2013
After inspecting the code I discovered that Func uses
files_without_match
so it's part of the search engine spec and has to be set in Search.pm
--
CrawfordCurrie - 19 Sep 2013