Feature Proposal: Make topic summary optionally based on search terms
Or: how to better scan search results for relevancy.
When doing a search if is often hard to decide if a found topic is relevant. Deciding would be easier if the topic summary showed the searched terms in context (sentence fragments). This is how Google presents search results.
- Add a
searchcontext parameter to
- raw summarized text is used (after calling
- the topic text is scanned for the search terms
- for each occurrence (following Google convention) 18 words around the text are used. If less than 9 word before the search term are available, the remainder amount of words after the term are used (so when after 6 words the search term is encountered, this will be displayed: 6 words before, term, 12 words after)
- after each "line" triple dots are displayed
- a maximum number of n characters will be used, so searching will stop when n characters are stored
- the resulting text will be parsed for occurrences of the search terms: these will be bolded
-- Contributors: ArthurClemens
On syntax, the existing tokens can be combined, for example
$summary(100, showvarnames, noheader)
. Expanding on that seems logical, such as
- 13 Mar 2007
Noone has disagreed here. The originator never reacted to Peters proposed spec.
Who will drive the implementation?
- 08 Apr 2007
seems logical to me. I am not sure if I can do it by myself.
- 08 Apr 2007
I amended the spec accordingly. Seems like a go, but we need a driver.
- 09 Apr 2007
Signing up for driver.
- 23 Apr 2007
Excellent, thanks Arthur!
- 24 Apr 2007
I've written the #Implementation
- 02 May 2007
Sounds like a very good spec to me.
- 05 May 2007
Accepted by 14-day rule
- 07 May 2007
Question: Is it aware of the number of chars in the summary, e.g.
- 08 May 2007
I'm very keen to use this. Is it available yet? What do I need to do?
- 01 Jun 2007
There's been no work on it yet, AFAIK. However a client of mine has come up with a similar request, so I may do some work on it.
- 02 Jun 2007
Did not make it before feature freeze. So this should not be checked in before after 4.2.0 is released.
- 03 Jun 2007
Supported with a monkey patch in SearchSummaryPlugin. Code should be reusable for the core when 4.2 is out.
Thanks Crawford. When we take this into the core I think it is better to add a
switch instead of a
preferences variable. The summary already groks
$summary(50, showvarnames, noheader)
- 06 Jun 2007
Good point, Peter. I was obviously focused on my clients requirements, so didn't need to support this.
- 08 Jun 2007
I look forward to this being supported and would venture that this should be the default.
- 17 Nov 2008
Yes, the plugin is definitely an improvement, so I can recommend to use the code.
- 17 Nov 2008 - 16:57
) is now in
. Simple solution: use the code from SearchSummaryPlugin and call that when
is used. Better is to integrate this into
and do the extra things in that sub.
Implementation task Tasks.Item8627
- 26 Feb 2010
Implemented. In the end I have rewritten the SearchSummaryPlugin code completely.
- 28 Feb 2010