Search for optional, mandatory, and excluded elements of a query - Search for optional, mandatory, and excluded elements of a query - Alfresco - Alfresco Search Enterprise - Alfresco/Alfresco-Search-Enterprise/3.2/Alfresco-Search-Enterprise/Alfresco-Search-Enterprise/Using/Search-for-optional-mandatory-and-excluded-elements-of-a-query - 3.2

Alfresco Search Enterprise

Platform
Alfresco
Product
Alfresco Search Enterprise
Release
3.2
ft:lastPublication
2026-05-06T19:34:57.842000
ft:locale
en-US
ArchiveStatus
Archived

Sometimes AND and OR are not enough. If you want to find documents that must contain the term "car", score those with the term "red" higher, but do not match those just containing "red".

Operator Description
"," The field, phrase, group is optional; a match increases the score.
"+" The field, phrase, group is mandatory.
"-", "!" The field, phrase, group must not match.

The following example finds documents that contain the term "car", score those with the term "red" higher, but does not match those just containing "red":

+car |red

Note

At least one element of a query must match, or not match, for there to be any results.

All AND and OR constructs can be expressed with these operators.