Skip to content

Search Criteria reference

Search Criteria are filters for Content and Location Search and Repository filtering.

Criteria can take some of the following arguments:

  • target - when the Criterion supports targeting a specific Field, example: FieldDefinition or Metadata identifier
  • value - the value(s) to filter on, typically a scalar or array of scalars
  • operator - constants on Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator: IN, EQ, GT, GTE, LT, LTE, LIKE, BETWEEN, CONTAINS. Most Criteria do not expose this and select EQ or IN depending on whether the value is scalar or an array. IN and BETWEEN always act on an array of values, while the other operators act on single scalar value
  • valueData - additional value data, required by some Criteria, for instance MapLocationDistance

Support and capabilities of individual Criteria can depend on the search engine.

In the Legacy search engine, the field index/sort key column is limited to 255 characters by design. Due to this storage limitation, searching content using the Country Field Type or Keyword when there are multiple values selected may not return all the expected results.

Search Criteria

Search Criterion Search based on Supported by
Ancestor Whether the Content item is an ancestor of the provided Location Content and Location Search; Filtering
ContentId Content item's ID Content and Location Search; Filtering
ContentTypeGroupId ID of the Content item's Content Type group Content and Location Search; Filtering
ContentTypeId ID of the Content item's Content Type Content and Location Search; Filtering
ContentTypeIdentifier Identifier of the Content item's Content Type Content and Location Search; Filtering
DateMetadata The date when content was created or last modified Content and Location Search; Filtering
Depth Location depth in the Content tree Location Search, Filtering
Field Content of one of Content item's Fields Content and Location Search
FieldRelation Content items the content in question has Relations to Content and Location Search
FullText Full text content of a Content item's Fields Content and Location Search
IsFieldEmpty Whether a specified Field of a Content item is empty or not Content and Location Search
IsMainLocation Whether a Location is the main Location of a Content item Location Search, Filtering
IsUserBased Whether content represents a User account Content and Location Search; Filtering
IsUserEnabled Whether a User account is enabled Content and Location Search; Filtering
LanguageCode Whether a Content item is translated into the selected language Content and Location Search; Filtering
LocationId Location ID Content and Location Search; Filtering
LocationRemoteId Location remote ID Content and Location Search; Filtering
MapLocationDistance Distance between the location contained in a MapLocation Field and the provided coordinates Content and Location Search
MatchAll Returns all search results Content and Location Search; Filtering
MatchNone Returns no search results Content and Location Search; Filtering
ObjectStateId Object State ID Content and Location Search; Filtering
ObjectStateIdentifier Object State Identifier Content and Location Search; Filtering
ParentLocationId Location ID of a Content item's parent Content and Location Search; Filtering
Priority Location priority Location Search, Filtering
RemoteId Remote content ID Content and Location Search; Filtering
SectionId ID of the Section content is assigned to Content and Location Search; Filtering
SectionIdentifier Identifier of the Section content is assigned to Content and Location Search; Filtering
Sibling Locations that are children of the same parent Content and Location Search; Filtering
Subtree Location subtree Content and Location Search; Filtering
UserEmail Email address of a User account Content and Location Search; Filtering
UserId User ID Content and Location Search; Filtering
UserLogin User login Content and Location Search; Filtering
UserMetadata The creator or modifier of a Content item Content and Location Search; Filtering
Visibility Whether the Content item is visible or not Content and Location Search; Filtering

Logical operators

Search Criterion Search based on Supported by
LogicalAnd Implements a logical AND Criterion. It matches if ALL of the provided Criteria match. Content and Location Search; Filtering
LogicalNot Implements a logical NOT Criterion. It matches if the provided Criterion doesn't match. Content and Location Search; Filtering
LogicalOr Implements a logical OR Criterion. It matches if at least one of the provided Criteria matches. Content and Location Search; Filtering