To find all nodes with the cm:name property containing the word banana:
要查找cm:name属性中包含单词banana的所有节点:

@cm\:name:'banana'

Lucene requires the : to be escaped using the \ character. You must escape the escape character in Java like ‘@cm\:name:'banana'‘
Lucene要求:使用\字符转义。你必须用类似于‘@cm\:name:'banana'‘的Java转义字符

You can use the full {namespace}localName version of QName to identify the property but you will have a bit more escaping to do.
您可以使用QName的完整{namespace}localName版本来标识该属性,但这样您将有更多的转义工作要做。

To find all nodes with the cm:name property containing words starting with ‘ban’:
要查找cm:name属性中包含以“ban”开头的单词的所有节点:

@cm\:name:ban*

To find all nodes with the cm:name property containing words ending with ‘ana’:
要查找cm:name属性中包含以“ana”结尾的单词的所有节点:

@cm\:name:*ana

The standard Lucene query parser does not allow wild cards at the start for performance reasons.
Use this with caution.
由于性能原因,标准Lucene查询解析器在开始时不允许使用通配符。
小心使用。

To find all nodes with the cm:name property containing words containing ‘anan’:
要查找cm:name属性中包含“anan”的单词的所有节点:

@cm\:name:*anan*

To find all nodes with the cm:name property containing phrase ‘green banana’:
要查找cm:name属性中包含短语“green banana”的所有节点:

@cm\:name:'green banana'
文档更新时间: 2020-02-10 17:09   作者:凌云文档