cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Answered

Is there anything like $summary (known from SEARCH) available?

I love the speed of DBQUERY. However, while migrating from existing SEARCH-based applications, I couldn't find any functionality that is equivalent to SEARCH's $summary(). As the topic texts should already be present in DBCacheContrib's index (in the $text) field, it should not be too much of an effort to make it accessible to DBQUERY.

Have I only missed the obvious or is there no way so far? In that case I may file an enhancement task item.

I would also be happy to get inspired for possible workarounds that still keep the processing speed high.

-- PhilippLeufke - 26 May 2013

Try a combination of $flatten() and $trunc() on the text.

-- MichaelDaum - 27 May 2013

Sorry for the late feedback. I didn't know that unlike in the Tasks web there are no automatically activated email notifications for replies...

I found a solution using FilterPlugin. Here is the (escaped) filter sequence that works very well and which filters out some noise such as a 'summary' headline etc.:

$percntSTARTEXTRACT{expand=\"off\" pattern=\"(Summary).*?[\r\n]+\s*\**-*\+*\s*(.*?)[\r\n]+\s*\**-*\+*\s*(.*?)[\r\n]+\" format=\"$dollar2 $dollarpercntBR$dollarpercnt $dollar3\"}$percnt
$percntDBCALL{\"$web.$topic\"}$percnt
$percntSTOPEXTRACT$percnt

-- PhilippLeufke - 02 Sep 2013
 

QuestionForm edit

Subject Using an extension
Extension DBCachePlugin
Version Foswiki 1.1.8
Status Answered
Related Topics
Topic revision: r3 - 02 Sep 2013, PhilippLeufke - This page was cached on 13 Jul 2018 - 21:14.

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