- 项目里的/app/my-site/oak-index目录使用的索引定义类型必须是
oak:Unstructured
- 使用Ensure Oak Index将content包中的oak索引翻译到/oak:index路径下,确保索引数据不会随着每次安装包的时候被清除和重新索引
- oak的小工具,其中包含根据查询语句自动生成索引定义文件oak-utils
- 示例定义文件
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal"
compatVersion="{Long}2"
async="[async,nrt]"
jcr:primaryType="oak:Unstructured"
evaluatePathRestrictions="{Boolean}true"
includedPaths="[/var/workflow/instances/server0]"
fullTextEnabled="{Boolean}false"
reindex="{Boolean}false"
reindexCount="{Long}1"
seed="{Long}-5565866337764551274"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<cq:Workflow jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<approvers name="metaData/approvers"
propertyIndex="{Boolean}true"
jcr:primaryType="nt:unstructured"/>
</properties>
</cq:Workflow>
</indexRules>
</jcr:root>
5.将Ensure Oak Index配置文件抽取到项目config中
网友评论