Copy link to clipboard
Copied
In my Responsive HTML5 output, when a user searches, the search results show (1) the topic name, (2) some words beneath it, and (3) breadcrumbs below it. If that particular topic has Index keywords associated it, #2 displays those keywords. In the Output presets, I've chosen to show "Text around the search term" but that's not what I'm seeing in the output.
From this website (https://www.grainge.org/pages/authoring/rh_tour/rh2022/toc_index_glossary/index.htm) I see that "The index keywords will also be shown in search results unless of course you have set your output to exclude the index." But I don't know how to set up my output to exclude the index.
In the output presets on the content tab, I tried unchecking "Include Index" but that didn't do it.
So how do I set up my output to exclude the index so that when you're searching in the output (i.e., not within Robohelp) you don't see the list of keywords in search results?
Copy link to clipboard
Copied
I hadn't ever seen the index keywords showing in the search results before. I played around and finally managed it. If the index keyword doesn't appear in the topic contents and I search for that keyword, then the search context "Text around the search term" is, logically, the other index keywords because they are all contained in the meta tag.
(it looks like <meta name="rh-index-keywords" content="Assets Folder,Contents Panel,rhubarb">. If I search for 'rhubarb' in this example, the index keywords display in the search results, but if I search for 'Contents Panel' the text around the search term displays.)
The only way to change this, I think, is to either select "Topic description" and add a decription to every topic, or select "Starting text of the topic".
Turning off "include index" won't change the behaviour because the keywords are in the topic. All this setting does is prevent the Index tab from showing the full lindex. (To remove the tab entirely, you have to change a setting in the skin.)
Copy link to clipboard
Copied
Note I tried this with the Azure Blue skin. It's also possible there are differences with other Responsive HTML5 skins. And I didn't try at all with Framless skins.
Copy link to clipboard
Copied
Thank you for your help. I had some follow up questions.
1. The first question is a clarification about your example:
"(it looks like <meta name="rh-index-keywords" content="Assets Folder,Contents Panel,rhubarb">. If I search for 'rhubarb' in this example, the index keywords display in the search results, but if I search for 'Contents Panel' the text around the search term displays.)"
Both "rhubarb" and "Contents Panel" appear in the keywords, so why would the search results be different? Is it because RoboHelp searches the keywords last? So the first (and only) instance of "rhubarb" is in the keywords whereas "Contents Panel" appears in the body of the topic as well as the keywords?
2. What is the difference between "search keywords" and "index keywords"? Currently all the keywords are index keywords but maybe we should be using search keywords? And if we did would the behavior be any different?
3. If I choose "Starting text of the topic" then the breadcrumbs are shown, which is redundant because the breadcrumbs are again shown below this section. In other words, the serach results show (1) the topic name, (2) some words beneath it, and (3) breadcrumbs below it. If I choose "Starting text of the topic" this becomes (1) the topic name, (2) breadcrumbs, and (3) breadcrumbs again. Is this to be expected? Is there any way around this? Ideally it would show the start of the topic starting at <body>.
Copy link to clipboard
Copied
So the first (and only) instance of "rhubarb" is in the keywords whereas "Contents Panel" appears in the body of the topic as well as the keywords?
Correct. Because "rhubarb" does not appear in the topic contents, the only "text around the search term" is the content of the meta keyword.
"index keywords" are terms that would traditionally appear in the index of a book. In online outputs these keywords appear in the Index tab/pane. "Search keywords" can be added to individual topics so that the topic appears in the search even though the term doesn't appear in the topic content. These keywords do not appear in any tab in online output, however they will appear as "Text around the search term" in the search results, similar to the index keywords, and are not used at all in printed outputs.
3. If I choose "Starting text of the topic" then the breadcrumbs are shown, which is redundant because the breadcrumbs are again shown below this section. In other words, the serach results show (1) the topic name, (2) some words beneath it, and (3) breadcrumbs below it. If I choose "Starting text of the topic" this becomes (1) the topic name, (2) breadcrumbs, and (3) breadcrumbs again. Is this to be expected? Is there any way around this? Ideally it would show the start of the topic starting at.
Please attach screenshots of what you are seeing as this doesn't seem to match what I see.
For the first option I get 1. Title, 2. keywords or topic text, 3. topic path or toc folder path.
For the second option I get 1. Title, 2. topic description (assuming a topic description has been entered for the topic), 3. topic path or toc folder path.