Maximum Search Results
Maximum Search Results
Is there a way to set the maximum number of results a search returns?
Re: Maximum Search Results
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:
where x is the maximum number of search results.
Before the closing bracket in the for statement for this function, I added this break statement:
Code: Select all
if (i==x)
{break;}
Re: Maximum Search Results
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...
Re: Maximum Search Results
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.
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.
My goal in life is to be as good a person as my dogs already think I am.
Re: Maximum Search Results
Good point. It occurred with the last maintenance update to 10.x.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.