HTML5 search not highlighting all terms

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Fiona
Sr. Propeller Head
Posts: 117
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.

HTML5 search not highlighting all terms

Post by Fiona »

I am generating HTML5 SideNav output.

If I perform a search on multiple terms, the results page correctly bolds any occurence of both of those terms in the displayed extracts. If I go to a page, the highlighting depends on whether I include Boolean options in my search.

If I search for A B, then all pages that include either A or B in them are returned. When I go to one of those pages, all occurences of both A and B are highlighted.

If I search for A + B, then all pages that contain both A and B are returned. However, when I go to one of those pages, only occurences of A are highlighted. If I reverse the order and search for B + A, then all pages that contain both A and B are returned as beofre, but when I go to one of those pages, only occurences of B are highlighted.

Sometimes it's desirable to use Boolean operators in searches, but this becomes less useful if only one of the terms is highlighted! Has anyone else experienced this (and, hopefully, found a solution!)?

Thanks. Fiona
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: HTML5 search not highlighting all terms

Post by Nita Beck »

Check your stylesheet. I suspect that your stylesheet defines only span.SearchHighlight1. Make sure that you have styles for span.SearchHighlight2 through span.SearchHighlight 10 as well (assuming you want to go that far). You could have a different background color for each one, or just set them all to the same color. My practice is to have them all have yellow as the background color.

https://help.madcapsoftware.com/flare20 ... h-Hits.htm
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Fiona
Sr. Propeller Head
Posts: 117
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.

Re: HTML5 search not highlighting all terms

Post by Fiona »

Hi Nita, thanks for the advise.

My stylesheet includes the following:

span.SearchHighlight,
span.SearchHighlight1,
span.SearchHighlight2,
span.SearchHighlight3,
span.SearchHighlight4,
span.SearchHighlight5
{
background-color: var(--search-highlight-color);
}

Is there any reason why this would not work? I tried playing with different colours, and when searching for multiple terms without Boolean operators they were all highlighted (in different colours when I used that).
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: HTML5 search not highlighting all terms

Post by NorthEast »

I think it's a Flare bug, as I get inconsistent search highlighting.

For example, if I do the following boloean 'or' searches:
A or B : works, both A and B are highlighted.
A|B (no spaces): doesn't work at all, neither A or B is highlighted
A | B (with spaces): highlights A only, but not B

(The 3 searches all worked, and gave the same results.)

So generally, it looks like the boolean words "and" "or" work fine, but it seems to get buggy when you use the characters "+" "&" (and) "|" (or), and more buggy if you don't include spaces.
Fiona
Sr. Propeller Head
Posts: 117
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.

Re: HTML5 search not highlighting all terms

Post by Fiona »

Thanks NorthEast, that confirms what I'm seeing. Unfortunately not all the Boolean operators that search says it supports have "name " equivalents, for example, XOR does not work although ^ does.

There are far too many issues with searching (we're been getting complaints from users), so I'm going to have to investigate alternative frameworks for it.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: HTML5 search not highlighting all terms

Post by NorthEast »

Yep, we have problems too, usually because folks expect it to work like Google, and don't realise the MadCap search only shows results that include all keywords.
Although we give tips on how to use the search, our analytics data shows very people actually use the boolean operators.
Post Reply