首页 > 解决方案 > 新的 html 内容未更新搜索索引

问题描述

我有一个带有 toc 和一些 html 文件作为集成帮助的 Eclipse 插件。 当我更改某些 HTML 文件时,不会重建搜索操作的索引。

我什至尝试按照此处所述预构建索引: https ://help.eclipse.org/2019-09/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fua_help_setup_preindex.htm

这是我的蚂蚁目标:

<target name="build.index" description="Builds search index for the plug-in: com.marchesini.mas.rcp.help." if="eclipse.running"> 
<help.buildHelpIndex manifest="plugin.xml" destination="."/> 
<help.buildHelpIndex manifest="plugin.xml" destination="nl/en_US"/> 
</target>

构建似乎是成功的,语言环境是 en_US,来自 config.ini。但是当我在运行时搜索索引时,它没有更新。

我发现触发索引重建的唯一方法是更改​​插件的版本号,如https://stackoverflow.com/a/12033859/11643143中所示。这真的是唯一的方法吗?

如何在插件部署时自动重建?

谢谢!

标签: eclipseeclipse-plugineclipse-rcp

解决方案


当然,相同的版本号意味着没有任何变化,包括帮助内容。

作为 hack,您可以在配置区域中删除子目录中的索引org.eclipse.help.base/index/

对于动态内容,您可以实现扩展点org.eclipse.help.ui.searchEngine


推荐阅读