java - 限制默认 cq5 搜索中的错误页面

标签 java javascript aem

我正在使用 CQ5 开箱即用的搜索组件。我的问题是错误页面显示在搜索结果中。

我可以知道如何限制错误页面在搜索中显示吗? 我们是否需要为页面添加一个新的属性,以便它可以被 QueryBuilder 限制?

最佳答案

如果您无法将您不希望被索引的内容与您所做的内容分开,则可以将搜索索引器配置为忽略特定内容或指定内容中的属性。这在 "How to modify the search engine configurations in CQ5 上有一些详细描述。 Adobe CQ Help 上的页面网站。

本质上,索引器可以通过将属性添加到 indexing_config.xml 文件来忽略它们,如下所示:

<index-rule nodeType="nt:base">
  <!-- ... existing ignored properties -->
  <property nodeScopeIndex="false">mySecretProperty</property>
</index-rule>

以下应排除具有特定资源类型的节点及其后代的页面。

<index-rule nodeType="nt:base" condition="@sling:resourceType='app/components/errorPage'" />
<index-rule nodeType="nt:base" condition="ancestor::*/@excludefromindex='app/components/errorPage'" />

长耳兔 Indexing Configuration页面有关于此文件语法的更多详细信息。

内容不会自动重新索引,可以找到如何触发重新索引的详细信息here .

关于java - 限制默认 cq5 搜索中的错误页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15639109/

相关文章:

javascript - 将 NSTaggedPointerString 转换为字符串

javascript - 如何从网页源中获取从这个到那个的字符串?

angularjs-directive - Ng-repeat 在 Sightly 中

maven - 无法执行目标 org.apache.felix :maven-scr-plugin:1. 17.0:scr

java - 如何将 Mat 转换为位图?(在 linux 上运行,而不是 android)

java - 为什么我会收到 java.net.ConnectException : Connection refused?

用于甘特图的 JavaScript/jQuery 库

aem - 在 cq5 小部件中隐藏和显示基于对话框中的复选框

java - 有人使用 Eclipse 成功构建了 Bruce Eckels 的 'Thinking in java' 第四版吗?

java - 如何在 Java 上创建/使用/导入自定义方法