Search filter reporting

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
ruthhoward
Sr. Propeller Head
Posts: 121
Joined: Tue Jul 24, 2012 12:38 am

Search filter reporting

Post by ruthhoward »

How can you make the search results report include the name of the filter used? Like:
Your search for "material" returned 1192 result(s) from "All Topics".
or
Your search for "material" returned 132 result(s) from "Administration".
Is there a variable I can set in the Search Heading for the UI Text in the search results skin (responsive output) in Flare 2017?

In the old tripane the filter used to remain selected and displayed so it was easy to tell which one was used but in responsive just the filter button changes and I don't know what I've filtered on any more.

Alternatively can a style be set up to make the selected filter have some sort of highlighting?
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Search filter reporting

Post by Nita Beck »

I don't think there's a way to do this now, but it's a terrific suggestion. I suspect that Flare already captures that information (or that it wouldn't be hard to capture), but is just not programmed to expose it. Be sure to put in a feature request; I will too.

(Caveat: If there IS already this feature, sorry that I don't know where to set it. I'm bleary-eyed after MadWorld 2017!)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
ruthhoward
Sr. Propeller Head
Posts: 121
Joined: Tue Jul 24, 2012 12:38 am

Re: Search filter reporting

Post by ruthhoward »

thanks for the reply. I'll do that.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Search filter reporting

Post by Nita Beck »

I just submitted a request...
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
ruthhoward
Sr. Propeller Head
Posts: 121
Joined: Tue Jul 24, 2012 12:38 am

Re: Search filter reporting

Post by ruthhoward »

me too and a support call to see if there's any option for highlighting the selected filter (I don't think there is looking at Styles.css)
itauthor
Propeller Head
Posts: 32
Joined: Wed Jul 23, 2008 7:51 am
Location: Oxford, UK
Contact:

Re: Search filter reporting

Post by itauthor »

I was hoping to find out how to do this exact thing.
Hopefully Madcap have added this since it was requested last year.

At the moment there is no way for the user to know that a filter is still applied. They can do a search and not realize that the reason they're not getting any results is because a filter is being applied. They might have set the filter some time ago - maybe the day - and then come back to this tab in their browser - so if they get no results they naturally think the help doesn't contain the information they're looking for.
itauthor
Propeller Head
Posts: 32
Joined: Wed Jul 23, 2008 7:51 am
Location: Oxford, UK
Contact:

Re: Search filter reporting

Post by itauthor »

Response from MadCap:
Subject: Re: (Case 127814) MadCap Flare 2017 r3 Support: No way for users to see that a search filter is applied

Hello Alistair,

Thank you for contacting Madcap Technical Support.

Currently, this feature is not yet implemented. However, I have added your information to the feature request (#102456) so that if it is implemented in the future you will be notified. Unfortunately, I do not have a specific timeline for the implementation.

Sincerely,
Kyle Colburn
Madcap Technical Support
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

Re: Search filter reporting

Post by Louise Bennett »

ANy update on whether this feature has been timelined, or even implemented? We just did some usability testing and it was something identified as a flaw by users.

Thanks, Louise.
chrisj
Propeller Head
Posts: 87
Joined: Thu Jun 26, 2014 8:08 am
Location: Omaha, NE

Re: Search filter reporting

Post by chrisj »

Louise Bennett wrote:ANy update on whether this feature has been timelined, or even implemented? We just did some usability testing and it was something identified as a flaw by users.

Thanks, Louise.
I don't have an update on an official Flare solution for you. But I have a script I can give you that grabs and decodes the filter from the URL. It's stored in a variable, so that could be inserted anywhere you want on the search page.
Chris Jones
Product Content Manager - TEAM Software
Image
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

Re: Search filter reporting

Post by Louise Bennett »

That would be awesome if you're happy to share - thanks Chris.
chrisj
Propeller Head
Posts: 87
Joined: Thu Jun 26, 2014 8:08 am
Location: Omaha, NE

Re: Search filter reporting

Post by chrisj »

Louise Bennett wrote:That would be awesome if you're happy to share - thanks Chris.

Code: Select all

$(document).ready(function(){

var filter=(window.location.search.split('&').splice(1)) // Creating a variable "filter" whose value is the filter text
filter = decodeURI(filter) //Getting rid of the codes that are used for spaces

filter = filter.substring(2) //getting rid of "f=" at the beginning

var $span = $( document.createElement('span') ); //creating a span element to contain the new text

$span.addClass('filter'); //adding the class filter to the span in case you would need to edit the styling
$span.text(" You are using the " +'"' +filter +'"' + " filter") //inserting some text and the value from the URL
$("h1").append($span) //appending the new span to the existing string. 

});
Create a .js file with that code and add it to your search results page. This will add the text "You are using the X filter." You could obviously edit this text and insert it wherever you want to on the page if you needed.
Chris Jones
Product Content Manager - TEAM Software
Image
debfigved
Jr. Propeller Head
Posts: 4
Joined: Thu Mar 31, 2016 8:48 am

Re: Search filter reporting

Post by debfigved »

I'm not a programmer, but do know how to use Notepad+ and add script or modify (from prior help request).
I'm not sure what is meant by add the .js file to the search results page. I need the search item highlighted in the output. I think this is what this script is doing.
Any more detailed help?
chrisj
Propeller Head
Posts: 87
Joined: Thu Jun 26, 2014 8:08 am
Location: Omaha, NE

Re: Search filter reporting

Post by chrisj »

debfigved wrote:I'm not a programmer, but do know how to use Notepad+ and add script or modify (from prior help request).
I'm not sure what is meant by add the .js file to the search results page. I need the search item highlighted in the output. I think this is what this script is doing.
Any more detailed help?
Sure. Copy the code into Notepad and save as a .js file. I recommend saving the file in to the Resources folder in your Flare project. You can then "add" the script to your search results topic (Insert tab > Script). If you do not have a custom search results topic, check out this post for how to do it https://www.madcapsoftware.com/blog/201 ... on-output/. And that is all you need to do, assuming you are using HTML5 output.
Chris Jones
Product Content Manager - TEAM Software
Image
Louise Bennett
Propeller Head
Posts: 81
Joined: Mon Apr 04, 2016 7:53 pm

Re: Search filter reporting

Post by Louise Bennett »

Thanks for that Chris.

Louise.
Post Reply