Maximum Search Results

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.

Maximum Search Results

Postby Ineffable on Wed Jul 23, 2014 2:07 pm

Is there a way to set the maximum number of results a search returns?
Ineffable
Sr. Propeller Head
 
Posts: 145
Joined: Mon Jan 15, 2007 3:08 pm
Location: morgan hill, ca

Re: Maximum Search Results

Postby Ineffable on Wed Aug 20, 2014 8:47 am

bump
Ineffable
Sr. Propeller Head
 
Posts: 145
Joined: Mon Jan 15, 2007 3:08 pm
Location: morgan hill, ca

Re: Maximum Search Results

Postby Ineffable on Thu Aug 21, 2014 9:40 am

If anyone is interested, I was able to find a solution. In the MadCapDefault.js file, line 591, is the PrepareSearchResults function.

Before the closing bracket in the for statement for this function, I added this break statement:

Code: Select all
if (i==x)
   {break;}


where x is the maximum number of search results.
Ineffable
Sr. Propeller Head
 
Posts: 145
Joined: Mon Jan 15, 2007 3:08 pm
Location: morgan hill, ca

Re: Maximum Search Results

Postby mlaird on Thu Aug 21, 2014 2:21 pm

This is an interesting answer! I wouldn't have thought to try this. Does the MadCapDefault.js file get overwritten each time you build the output? I would have thought it would, and that would erase this change - or at least require the edit to be a post-generation step, every time you make the HTML...
mlaird
Propeller Head
 
Posts: 49
Joined: Wed Feb 06, 2013 3:18 pm

Re: Maximum Search Results

Postby Msquared on Thu Aug 21, 2014 3:20 pm

Yes it does get overwritten when you build, but it doesn't change, I don't think. It is just copied from wherever MadCap hides the master copy. So once you have the version you want to use, with your changes, just add a post-build step to overwrite Flare's version with your modified version.

It may change across Flare releases though, so you will need to make a new modified version if you install a newer version of Flare.
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
Msquared
Propellus Maximus
 
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Maximum Search Results

Postby Ineffable on Mon Sep 29, 2014 1:43 pm

Msquared wrote:It may change across Flare releases though, so you will need to make a new modified version if you install a newer version of Flare.


Good point. It occurred with the last maintenance update to 10.x.
Ineffable
Sr. Propeller Head
 
Posts: 145
Joined: Mon Jan 15, 2007 3:08 pm
Location: morgan hill, ca


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 3 guests