Any of the above queries can be combined using the Lucene standard methods.
以上任何查询都可以使用Lucene标准方法进行组合

The prefixes:
前缀:

  • - must not match (Caution: This is a restriction on the search results of the other terms)
  • + must match
  • (no prefix) may match (if there are only unprefixed clauses one must match)

You may also use AND, OR and NOT.

To match two attributes:
匹配两个属性:

+@test\:one:'mustmatch' +@test\:two:'mustalsomatch'
@test\:one:'mustmatch' AND @test\:two:'mustalsomatch'

To match one or other attribute:
匹配一个或更多其他属性:

@test\:one:'maymatch' @test\:two:'maymatch'
@test\:one:'maymatch' OR @test\:two:'maymatch'

To match one attribute and not another:
要匹配一个属性而不是另一个属性:

+@test\:one:'mustmatch' -@test\:two:'mustnotmatch'
@test\:one:'mustmatch' AND NOT @test\:two:'mustnotmatch'

However, you cannot just do a search on elements not matching a criteria:
但是,不能只搜索与条件不匹配的元素:

-@test\:two:'mustnotmatch'

as it will not return any results (as it is a restriction on an empty set).
因为它不会返回任何结果(因为它是对空集的限制)。

Instead, use a query similar to the following
可以使用类似于以下的查询语句来替代

+TYPE:'sys:base' -@test\:two:'mustnotmatch'

Any of the previous simple searches may be combined in these ways.
以前的任何简单搜索都可以通过这些方式进行组合。

For example, to restrict a search by location in the hierarchy, and category, and full text search against title:

+PATH:'/cm:generalclassifiable/cm:Software_x0020_Document_x0020_Classification/member'
+@cm\:title:'banana'
+PATH:'/sys:user//*'
文档更新时间: 2020-02-10 21:09   作者:凌云文档