When user searches help contents of a product, the search is performed within a documentation index. By default, this index is created on the first invocation of help search, but can be pre-built and delivered to the user with each plug-in, since 3.1, or as a complete index for a product. This prevents indexing from occurring on the user machine and lets the user obtain first search results faster.
To build an index follow the steps:
index
element to the org.eclipse.help.toc
extension
in a documentation plug-in, to specify directory where
index will exist, for example
<extension point="org.eclipse.help.toc"> <index path="index"> </index> </extension>
help.buildHelpIndex
ANT task to the build.xml file in
the plugin project by adding the lines below. A build.xml file can be created
by right clinking on MANIFEST.MF in the package explorer and selecting the
menu item PDE Tools/Create Ant Build File. This example build the index for
the default locale and also for "nl/fr". This should be modified to match the
locales which you are using.<target name="build.index" description="Builds search index for the plug-in: org.eclipse.platform.doc.user." if="eclipse.running"> <help.buildHelpIndex manifest="plugin.xml" destination="."/> <help.buildHelpIndex manifest="plugin.xml" destination="nl/fr"/> </target>
Per-product index is a one aggregate index of all documentation in the product. It should be used in scenarios in which the set of documentation plug-ins is not changing. For example an info-center installation will benefit from per-product index.
To build an index follow the steps:
eclipse -nosplash -application org.eclipse.help.base.indexTool -vmargs -DindexOutput=outputDirectory -DindexLocale=localefrom the directory containing the product. The following arguments need to be set :
For example, running
eclipse -nosplash -application org.eclipse.help.base.indexTool -vmargs -DindexOutput=d:/build/com.my.plugin -DindexLocale=en
will result in file doc_index.zip being saved in the nl/en
directory that will be created under d:/build/com.my.plugin. The
zip will contain index of contents of documents that are available to users
when they run the product in the en locale.
com.my.plugin/
plugin.xml
nl/
de/
doc_index.zip
en/
doc_index.zip
zh/
CN/
doc_index.zip
other files of this plugin
org.eclipse.help.base/productIndex=com.my.plugin