This question about Using an extension: Answered
SearchConnector fails to return data
I am using the wiki workbench configured with the SearchConnector. I know, I can use the dbcache connector, but I am starting with a default config.
I find that the DATATABLE does not return any data on the WebHome or Type pages. The DATATABLE uses a query, which varies by connector type.
The workbench uses a query matching the DBQUERY parameters: "topic='.*'". For the SearchConnector that should be a "name='.*'" query. That issue can be fixed in the documentation of the wiki work bench.
However, after changing the query, there are still no results returned. After some traceing and trial and error I found that the SearchConnector line: 213
208 my $hits = Foswiki::Func::query(
209 $params{query},
210 undef,
211 {
212 type => "query",
213 web => $params{web}, # <===================
214 reverse => $params{reverse},
215 order => $sort,
216 files_without_match => 1, # SMELL: try this
217 }
218 );
associates the web to search with the params{web}.
The debugger shows that params{web} is allocated to the WEB variable, which is Applications. There is another parameter params{webs} (plural) that is correctly assigned to the BASWEB as defined in the wiki workbench pages: RenderWikiApplicationWebHome and RenderTopicsOfType. param{webs} is an array, so I changed line: 213 to
web => join(',',@{$params{webs}}),
and that solves the problem.
Looking at Connector Line: 147
147 ($totalRecords, $totalDisplayRecords, $data) = $this->search(
148 web => $web,
147 topic => $topic,
150 webs => \@webs,
151 query => $query,
152 sort => $sort,
153 reverse => $reverse,
154 fields => \@fields,
155 limit => $limit,
156 skip => $skip,
157 form => $form,
158 );
I guess that param{web} is the location (web/topic) where the request is initiated. and param{webs} is the webs to be searched. If that guess is correct, the the solution above is sane.
Can someone confirm?
--
BramVanOosterhout - 11 Apr 2020
All other connectors - search and solr - need work. The only one really working is the dbcache connector. As you''ve got the nessesary plugins installed already, please switch the default connector in configure to dbcache. The other connectors still need work, i.e the solr one. That's what I am currenty working on...
Btw, I wont be working on the normal search connector using the standard foswiki search engine. This is simply too slow to give satisfying interactive performance in any case. Goal is to get the solr one on par with the dbcache one.
--
MichaelDaum - 11 Apr 2020
Hi Michael,
It seems that I fell into a work in progress and
Task Item14667: Provide webs option in DATATABLE macro is in the process of being resolved. And that the issue described above is real.
I understand that dbcache is the preferred connector and will switch to that connector in the wiki workbench.
Suggestion: since the wiki workbench requires the DBCacheContrib/Plugin one could be explicit with connector="dbcache" on the RenderWikiApplicationWebHome and RenderTopicsOfType pages.That would leave the Foswiki out-of-the-box configuration as 'search' and yet provide an out-of-the-box working wiki workbench.
Thanks for the update and the work on the connectors.
Kind regards
--
BramVanOosterhout - 12 Apr 2020
ok
--
MichaelDaum - 12 Apr 2020