Page 1 of 1

Forcing a search result not present in the text

Posted: Mon Aug 01, 2022 8:22 am
by mdslup
I have a series of dita topics. Each topic contains many tables. I want to assign each table a "unique id" such that searching for that unique ID displays the appropriate table in the search result. However, I do not want the "unique id" to appear anywhere in the text itself.
I thought I could use metadata to do this, but I think metadata only applies on a per-file basis? How can I make a piece of metadata apply to just a section of a topic (and have multiple metadata entries in the same page, each applying to a different table)?

Re: Forcing a search result not present in the text

Posted: Tue Aug 02, 2022 12:41 pm
by alin
Hello,

Please note that each search result corresponds to a HTML page in the WebHelp Responsive output. When you enter a search term in the search field the Search Results page lists all the HTML pages that where matched by your search query. A search result cannot point to a subsection of a HTML page or to a table as in your case.
Thus when you search for a particular table, the search results would display the link to the HTML file containing that table. You can use the DITA keyword support to annotate a DITA topic with the unique IDs associated with the tables that it contains. The <indexterm> and <keywords> DITA elements are an effective way to increase the ranking of a page.

Regards,
Alin