how to exclude topics from webhelp search

Questions about XML that are not covered by the other forums should go here.
mark_whisler
Posts: 18
Joined: Fri Sep 12, 2014 1:07 am

how to exclude topics from webhelp search

Post by mark_whisler » Thu Jul 30, 2015 4:20 pm

We have a large help system which contains thousands of error/info/warning messages. I'd like to be able to exclude or restrict search on those. Does oXygen webhelp support the following use in the topicref?

Code: Select all

<topicref search="no" toc="no" href="bla/bla.msg"/>
Is it possible to limit or filter search to a standard element within a topic, such as an id?

Thanks

bogdan_cercelaru
Posts: 221
Joined: Tue Jul 01, 2014 11:48 am

Re: how to exclude topics from webhelp search

Post by bogdan_cercelaru » Mon Aug 03, 2015 10:08 am

Hello,

Unfortunately Oxygen WebHelp does not have implemented the use of "search" attribute to filter the topics included in the search results of WebHelp output.
mark_whisler wrote:Is it possible to limit or filter search to a standard element within a topic, such as an id?
You should use a custom build file and override the "webhelp-index" target from the OXYGEN_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\build_common.xml file. Add the identifier of the elements that you want to be filtered to the "doNotIndex" attribute of the "indexertask" element.
Your custom build file should look like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist">

<!-- Create the JavaScript files with the search database. -->
<target name="webhelp-index" depends="check-list">
<taskdef name="indexertask" classname="ro.sync.exml.indexer.IndexerTask"/>
<echo>Indexing html files in ${output.dir}, indexer language is: ${webhelp.language}</echo>
<indexertask
htmlDir="${output.dir}"
resourcesDir="${output.dir}/oxygen-webhelp"
outputDir="${output.dir}/oxygen-webhelp/search"
propsDir="indexer"
indexerLanguage="${webhelp.language}"
htmlExtension="${args.outext}"
stem="${use.stemming}"
userDictionary="${webhelp.search.japanese.dictionary}"
doNotIndex="div.ignore,div.navfooter,div.footer,div.navheader"/>
</target>

<!--The DITA OT default build file-->
<import file="build.xml"/>

<target name="dist">
<!--Call the DITA OT default target-->
<antcall target="init"/>
</target>
</project>
Here you can find more details about using a custom build file: Author for DITA / DITA-OT Customization / Using Your Custom Build File

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply