Copy link to clipboard
Copied
I am trying to set my default search parameter to OR. Seems it currently defaults to AND and the amount of search results are too high. Is there a way to set a Responsive HTML5 output to default search mutliple search terms as OR? It seems only Webhelp output has a setting to make AND/OR or just AND the default search output option.
Thanks in advance for any assistance.
Anthony
Copy link to clipboard
Copied
Assuming that you are using RoboHelp 2015: In layouts of Responsive HTML5, by default search is OR. When you start typing search term it shows the option for AND(All search terms).
Also number of search results are more in case of OR not AND.
OR search means: if multiple search terms are there then if any term is present in any topic then that topic is shown in search results.
AND means: Only those topics are shown in search results which have all the search terms written in search box.
Feel free to query.
Thanks.
Copy link to clipboard
Copied
1. I am using RoboHelp 11.
2. When I start typing a search term it does NOT show the option for AND(all search terms), when and where are you seeing this?
3. You are correct, the total number of search results are more with an OR search. You are also correct that the default is set to OR. My mistake. I want to set default to AND, like i do in WebHelp output in the Responsive_HTML5 output.
Search Terms and result totals.
Search scenario 1:
Search: Repository
Result total: 45 results
Search scenario 2:
Search: Repository files
Result total: 82 results
Search scenario 3:
Search: Repository and files
Result total: 9 results
I want scenario 2 to have the same results as scenario 3.
Ill rephrase my question, Is there a way to set the default search criteria for Responsive_HTML5 output to be AND in RoboHelp 11.
Thank You,
Anthony
Copy link to clipboard
Copied
In Output, On Search page there is option to enable And Search Page.
As you said you want same results for "Repository files" and "Repository and files", It will be same only when in first case, AND search is enabled.
When in a phrase there is "and", it means AND in boolean terms and does AND search.
In UI, there is not an option to enable AND search but you can make changes in the Topic.slp file and make it work your way.
This is what you need to do for setting AND search by default:
1. From the layout, Open topic.slp in notepad.
2. Find "<div class="cSearchAND">"
3. Within this div, make the following change:
<?rh-msp-search-and-control id="andsearch"
widgettype="andsearch"
type="checkbox"
class="wSearchAND" checked="checked"?>
text in bold is the new text to be added. Save the file and generate output and you are done.
PS: Make sure to clear cookies of your browser.
Let me know if it works for you.