Improving Webhelp Search Function

This forum is for all Flare issues not related to any of the other categories.
Post Reply
CJWyckoff
Propeller Head
Posts: 29
Joined: Fri Oct 31, 2008 2:10 pm

Improving Webhelp Search Function

Post by CJWyckoff »

Our primary WebHelp site has thousands of topics. When a user initiates a search, they can get an excess of returned topics.
I found the information on Boolean searches in the KB; is there anything that we can do in the topics, such as adding metatags, that would improve search results without knowing about Booleans? Is general information available that details how the search database is compiled and what factors it looks for?
cjw
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Improving Webhelp Search Function

Post by NorthEast »

If you've got a lot of topics, then using search filters would probably be quite useful. Anyway, I found a few snippets from previous posts...
Dave Lee wrote:There's a topic in the knowledgebase about how the search rankings work.
http://kb.madcapsoftware.com/Default_CSH.htm#OUTA1008F

I find searches work quite well for me in general, but you might get poor results if:
- the term/phrase you're searching for is used very frequently in a number of topics, meaning too many results
- topic titles aren't very informative, meaning the user can't spot the topic they want from the list

Other things that may be worth looking at are synonyms and search filters.

Synonyms are alternative words that the user might search for, e.g. you could have a group synonym 'URL=link=address', meaning a search for any one of those terms will also show topics that contain the other terms.

If you have a large knowledgebase, search filters may be useful to filter your search results. You can see an example in the MadCap knowledgebase, where you can filter by product.
Dave Lee wrote:Rather than go through it all here, I would have a look in Flare's help.

Synonyms
- Creating Synonyms to Enhance Search Results

Search filters
- Inserting Concept Keywords into Topics (for how to insert a concept term)
- Adding Search Filter Sets to Projects
- Creating Search Filters (for linking your filters to your concept terms)
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Improving Webhelp Search Function

Post by RamonS »

While Search is surely more popular with users you may want to take a look at a well-done Index. Indexing is not easy (meaning which words to use and what to index), but a good index makes finding stuff a breeze. I know, that is all nice and such if the user goes to the Search tab, gets 50 replies, and then dials support.
CJWyckoff
Propeller Head
Posts: 29
Joined: Fri Oct 31, 2008 2:10 pm

Re: Improving Webhelp Search Function

Post by CJWyckoff »

Thanks for your ideas.
cjw
jamesw
Propeller Head
Posts: 30
Joined: Thu Jan 04, 2007 7:21 pm

Re: Improving Webhelp Search Function

Post by jamesw »

I asked MadCap support how the system determines how search results are ranked in WebHelp and I've been told that when a search term occurs in the <TITLE> element, it is given the most weight, and if it occurs in any heading (h1 to h9) it is given lesser weight. The hierarchy that shows how much weight a term gets (from top to bottom) is:
Titles > Headings > Formatting (bold) > Number of times in body > Body

So if we want to make a topic appear higher in the search results list when you search for particular words, we add <div class="keyword">search term or terms</div> to the top of the page just before the first heading of the help topic, and in our stylesheet we have added a definition:
.keyword
{
display: none;
mc-heading-level: 1;
}
James Willoughby
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Improving Webhelp Search Function

Post by NorthEast »

jamesw wrote:I asked MadCap support how the system determines how search results are ranked in WebHelp and I've been told that when a search term occurs in the <TITLE> element, it is given the most weight, and if it occurs in any heading (h1 to h9) it is given lesser weight. The hierarchy that shows how much weight a term gets (from top to bottom) is:
Titles > Headings > Formatting (bold) > Number of times in body > Body

So if we want to make a topic appear higher in the search results list when you search for particular words, we add <div class="keyword">search term or terms</div> to the top of the page just before the first heading of the help topic, and in our stylesheet we have added a definition:
.keyword
{
display: none;
mc-heading-level: 1;
}
Cheers - that's quite helpful.
One other thing to mention is that the search results also include index terms; i.e. results include topics including that term in an index entry (without it having to be in the body of the topic text). I'm not sure what weight they have in the ranking order though.

Did MadCap support suggest that idea of using a div style with mc-heading-level ?

I can see it would partially work in that you could include hidden search terms in the topic, but I don't think using the mc-heading-level property makes any difference to the ranking. I understand that a term included a heading level tag <h1>-<h6> is ranked higher, but I'm not sure the ranking applies to non-heading styles with the mc-heading-level property. I did a few quick tests and terms marked using your style didn't appear to be ranked higher alongside 'real' headings (using h tags), they just appear just to be treated like normal paragraph text.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Improving Webhelp Search Function

Post by LTinker68 »

jamesw wrote: .keyword
{
display: none;
mc-heading-level: 1;
}
Doesn't having the mc-heading-level make the keywords appear in the generated print TOC? The text won't appear in the topic because of the display being set to none, but the mc-heading-level of 1 should make the text get picked up by the printed TOC. If you're generating online output only then it's not a problem, but if you do print output then I don't think you want an mc-heading-level in your style definition, unless you maybe set it to 0, maybe. A value of 0 means it won't be in the printed TOC but it might still be enough to elevate your search results.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
jamesw
Propeller Head
Posts: 30
Joined: Thu Jan 04, 2007 7:21 pm

Re: Improving Webhelp Search Function

Post by jamesw »

Dave, good point about the index terms. (I also do not know what weight they have though.)
mc-heading-level was my idea, not MadCap's. I think you are right - when I remove mc-heading-level from the class definition in the stylesheet and then rebuild, the search ranking is the same as it was before so mc-heading-level is not making any difference. Just having the keywords in the body of the document has got me the result I wanted.
Actually all this good for me as it points me to a couple more things I can try should I need to bump certain topics up the ranking ladder.

Lisa, for the sake of brevity I previously didn't mention that I use a different stylesheet for printed outputs (print.css). In that I set the .keyword definition to just display: none; I've then been able to build Word and PDF without the keywords appearing in my TOC near the front of my document (and also the keywords do not appear in the PDF bookmarks pane.)
p.s. Although given what Dave said, there may not be any value in having two different .keyword definitions. When I have time to experiment I'll try using h2.keyword or setting .keyword to have bold formatting and see if that gives greater weight in the search ranking without introducing problems in printed output.
Thanks for your comments!
James Willoughby
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Improving Webhelp Search Function

Post by NorthEast »

jamesw wrote:When I have time to experiment I'll try using h2.keyword or setting .
Yep, I completely overlooked the obvious here.

Just put your terms in a heading tag and then apply the keyword class.
Using h2.keyword will work, or use whichever level h1-h6 to control the weight of your terms in the rankings (relative to 'normal' headings).
jamesw
Propeller Head
Posts: 30
Joined: Thu Jan 04, 2007 7:21 pm

Re: Improving Webhelp Search Function

Post by jamesw »

Also here's some additional info that is relevant.
My excellent colleague just alerted me to the following article that provides more detail on how the search works
http://userassistance.com/tips/flare_ti ... kings.html
James Willoughby
Post Reply