Dealing with "not" in MadCap search

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
semicolon enthusiast
Jr. Propeller Head
Posts: 1
Joined: Tue Jul 26, 2022 1:06 pm

Dealing with "not" in MadCap search

Post by semicolon enthusiast »

Greetings!

My team uses MadCap search for our help site, and we've had persistent issues with searches that include the word "not." After a fair bit of testing, we've figured a number of things out:
  • When written as "not" or "NOT" the word functions as a Boolean operator.
  • When written as "Not," "nOt," etc. it's searched like a normal word.
  • The function of this operator is to search for things before "not" but not after it. E.g., searching "Can not log in" returns pages that contain "can" and don't contain "log" or "in."
  • If you start a search with "not" it fails with an error. E.g., "Not able to log in" throws the error "Ensure that the search string is properly formatted."
  • "not" is on the stopwords list by default, but that doesn't effect the Boolean functionality. Likewise adding "not" to synonyms appears to do nothing.
To continue with the example of the search "can not log in," "can" is also on the default stop words list (we could remove it, but that wouldn't be desirable). For that reason, searches starting with "can not" will deterministically produce 0 results for anyone using the default MadCap search settings. This has been a thorn in our side for a while now, so I'm curious if anyone else has found a good solution to this problem or other good ways to customize search behavior. (I don't want to get off topic, but to give another example, having a blank space be a Boolean "or" rather than a Boolean "and" would be a huge win for us.)
scap
Propeller Head
Posts: 52
Joined: Tue Jun 28, 2022 7:36 am

Re: Dealing with "not" in MadCap search

Post by scap »

Absolutely wild, great finds and info-sharing.

Can Flare search strings be altered before they are run? Just thinking you could have a script that searches the search string for can and not, and rejigs the search string so that it works as expected.

e.g. can not log in -> "can not" log in
RStreets
Propeller Head
Posts: 63
Joined: Wed Apr 19, 2017 8:37 am
Location: Cambridge, UK

Re: Dealing with "not" in MadCap search

Post by RStreets »

But "cannot" at the beginning of a search works OK. So there's a workaround, but the problem then is educating users as to all the quirks (and the different issue as to whether we should or whether the search should work more intuitively).
Rae Streets (Flare user since 2017, now on Flare 2023; Central user from 2020)
scap
Propeller Head
Posts: 52
Joined: Tue Jun 28, 2022 7:36 am

Re: Dealing with "not" in MadCap search

Post by scap »

Stumbled across a strange one...

Searching for found in my HTML5 output returns no results, despite the word being in numerous places.

Happening for anyone else?
Feebeegeebee
Sr. Propeller Head
Posts: 213
Joined: Wed Aug 08, 2012 8:38 am
Location: UK

Re: Dealing with "not" in MadCap search

Post by Feebeegeebee »

scap wrote:Stumbled across a strange one...

Searching for found in my HTML5 output returns no results, despite the word being in numerous places.

Happening for anyone else?
Hi scap,
It's not appearing, as the word 'found' is included in the English Stop Word list. You can see a full list of the words included in that list here:

https://help.madcapsoftware.com/flare20 ... rdsEnglish

Regards,
Feebeegeebee
-----------------------------------------------------
Using Flare 2022 on Windows 11 (64-bit)
-----------------------------------------------------
Post Reply