# Search Criteria reference

> For the complete documentation index, see [llms.txt](https://doc.ibexa.co/en/saas/llms.txt).

Search Criteria help define and fine-tune search queries for content and locations.

Search Criteria are filters for content and location search.

You use them over the REST API, in the `Filter` or `Query` element of the payload of the [`POST /views`](https://doc.ibexa.co/en/saas/api/rest_api/rest_api_reference/rest_api_reference.html#tag/Views/operation/ibexa.rest.views.create) request. In the payload, the name of a Criterion has the `Criterion` suffix, for example, `ContentIdCriterion`. Criteria that you provide in one `Filter` or `Query` element are combined with a logical AND. To build more complex conditions, nest them in the [`AND`](https://doc.ibexa.co/en/saas/search/criteria_reference/logicaland_criterion/index.md), [`OR`](https://doc.ibexa.co/en/saas/search/criteria_reference/logicalor_criterion/index.md), and [`NOT`](https://doc.ibexa.co/en/saas/search/criteria_reference/logicalnot_criterion/index.md) elements.

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` - one of `IN`, `EQ`, `GT`, `GTE`, `LT`, `LTE`, `LIKE`, `BETWEEN`, `CONTAINS`. Most Criteria don't 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

## Search Criteria

| Search Criterion                                                                                                           | Search based on                                                         | Content Search | Location Search | Filtering |
| -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------------- | --------------- | --------- |
| [Ancestor](https://doc.ibexa.co/en/saas/search/criteria_reference/ancestor_criterion/index.md)                             | Whether the content item is an ancestor of the provided location        | Yes            | Yes             | Yes       |
| [ContentId](https://doc.ibexa.co/en/saas/search/criteria_reference/contentid_criterion/index.md)                           | Content item's ID                                                       | Yes            | Yes             | Yes       |
| [ContentName](https://doc.ibexa.co/en/saas/search/criteria_reference/contentname_criterion/index.md)                       | Content item's name                                                     | Yes            | Yes             | Yes       |
| [ContentTypeGroupId](https://doc.ibexa.co/en/saas/search/criteria_reference/contenttypegroupid_criterion/index.md)         | ID of the content item's content type group                             | Yes            | Yes             | Yes       |
| [ContentTypeId](https://doc.ibexa.co/en/saas/search/criteria_reference/contenttypeid_criterion/index.md)                   | ID of the content item's content type                                   | Yes            | Yes             | Yes       |
| [ContentTypeIdentifier](https://doc.ibexa.co/en/saas/search/criteria_reference/contenttypeidentifier_criterion/index.md)   | Identifier of the content item's content type                           | Yes            | Yes             | Yes       |
| [DateMetadata](https://doc.ibexa.co/en/saas/search/criteria_reference/datemetadata_criterion/index.md)                     | The date when content was created or last modified                      | Yes            | Yes             | Yes       |
| [Field](https://doc.ibexa.co/en/saas/search/criteria_reference/field_criterion/index.md)                                   | Content of one of content item's fields                                 | Yes            | Yes             |           |
| [FullText](https://doc.ibexa.co/en/saas/search/criteria_reference/fulltext_criterion/index.md)                             | Full text content of a content item's fields                            | Yes            | Yes             |           |
| [Image](https://doc.ibexa.co/en/saas/search/criteria_reference/image_criterion/index.md)                                   | Image by specified image attributes                                     | Yes            | Yes             |           |
| [ImageDimensions](https://doc.ibexa.co/en/saas/search/criteria_reference/imagedimensions_criterion/index.md)               | Image dimensions: height and width                                      | Yes            | Yes             |           |
| [ImageFileSize](https://doc.ibexa.co/en/saas/search/criteria_reference/imagefilesize_criterion/index.md)                   | Image size in MB                                                        | Yes            | Yes             |           |
| [ImageMimeType](https://doc.ibexa.co/en/saas/search/criteria_reference/imagemimetype_criterion/index.md)                   | Image type                                                              | Yes            | Yes             |           |
| [ImageOrientation](https://doc.ibexa.co/en/saas/search/criteria_reference/imageorientation_criterion/index.md)             | Image orientation                                                       | Yes            | Yes             |           |
| [IsBookmarked](https://doc.ibexa.co/en/saas/search/criteria_reference/isbookmarked_criterion/index.md)                     | Whether a location is bookmarked or not                                 |                | Yes             | Yes       |
| [IsContainer](https://doc.ibexa.co/en/saas/search/criteria_reference/iscontainer_criterion/index.md)                       | Whether a content item is a container (can contain other content items) | Yes            | Yes             | Yes       |
| [IsUserEnabled](https://doc.ibexa.co/en/saas/search/criteria_reference/isuserenabled_criterion/index.md)                   | Whether a User account is enabled                                       | Yes            | Yes             | Yes       |
| [LanguageCode](https://doc.ibexa.co/en/saas/search/criteria_reference/languagecode_criterion/index.md)                     | Whether a content item is translated into the selected language         | Yes            | Yes             | Yes       |
| [LocationId](https://doc.ibexa.co/en/saas/search/criteria_reference/locationid_criterion/index.md)                         | Location ID                                                             | Yes            | Yes             | Yes       |
| [LocationRemoteId](https://doc.ibexa.co/en/saas/search/criteria_reference/locationremoteid_criterion/index.md)             | Location remote ID                                                      | Yes            | Yes             | Yes       |
| [ObjectStateId](https://doc.ibexa.co/en/saas/search/criteria_reference/objectstateid_criterion/index.md)                   | Object state ID                                                         | Yes            | Yes             | Yes       |
| [ObjectStateIdentifier](https://doc.ibexa.co/en/saas/search/criteria_reference/objectstateidentifier_criterion/index.md)   | Object state Identifier                                                 | Yes            | Yes             | Yes       |
| [ParentLocationId](https://doc.ibexa.co/en/saas/search/criteria_reference/parentlocationid_criterion/index.md)             | Location ID of a content item's parent                                  | Yes            | Yes             | Yes       |
| [ParentLocationRemoteId](https://doc.ibexa.co/en/saas/search/criteria_reference/parentlocationremoteId_criterion/index.md) | Location remote ID of a content item's parent                           | Yes            | Yes             |           |
| [RemoteId](https://doc.ibexa.co/en/saas/search/criteria_reference/remoteid_criterion/index.md)                             | Remote content ID                                                       | Yes            | Yes             | Yes       |
| [SectionId](https://doc.ibexa.co/en/saas/search/criteria_reference/sectionid_criterion/index.md)                           | ID of the Section content is assigned to                                | Yes            | Yes             | Yes       |
| [SectionIdentifier](https://doc.ibexa.co/en/saas/search/criteria_reference/sectionidentifier_criterion/index.md)           | Identifier of the Section content is assigned to                        | Yes            | Yes             | Yes       |
| [Sibling](https://doc.ibexa.co/en/saas/search/criteria_reference/sibling_criterion/index.md)                               | Locations that are children of the same parent                          | Yes            | Yes             | Yes       |
| [Subtree](https://doc.ibexa.co/en/saas/search/criteria_reference/subtree_criterion/index.md)                               | Location subtree                                                        | Yes            | Yes             | Yes       |
| [UserEmail](https://doc.ibexa.co/en/saas/search/criteria_reference/useremail_criterion/index.md)                           | Email address of a User account                                         | Yes            | Yes             | Yes       |
| [UserId](https://doc.ibexa.co/en/saas/search/criteria_reference/userid_criterion/index.md)                                 | User ID                                                                 | Yes            | Yes             | Yes       |
| [UserLogin](https://doc.ibexa.co/en/saas/search/criteria_reference/userlogin_criterion/index.md)                           | User login                                                              | Yes            | Yes             | Yes       |
| [UserMetadata](https://doc.ibexa.co/en/saas/search/criteria_reference/usermetadata_criterion/index.md)                     | The creator or modifier of a content item                               | Yes            | Yes             | Yes       |
| [Visibility](https://doc.ibexa.co/en/saas/search/criteria_reference/visibility_criterion/index.md)                         | Whether the content item is visible or not                              | Yes            | Yes             | Yes       |

### Logical operators

All Logical operators are supported by Content and Location Search.

| Search Criterion                                                                                   |
| -------------------------------------------------------------------------------------------------- |
| [LogicalAnd](https://doc.ibexa.co/en/saas/search/criteria_reference/logicaland_criterion/index.md) |
| [LogicalNot](https://doc.ibexa.co/en/saas/search/criteria_reference/logicalnot_criterion/index.md) |
| [LogicalOr](https://doc.ibexa.co/en/saas/search/criteria_reference/logicalor_criterion/index.md)   |
