diff --git a/docs/search/criteria_reference/ancestor_criterion.md b/docs/search/criteria_reference/ancestor_criterion.md index d0853413a0..8b56d39ac5 100644 --- a/docs/search/criteria_reference/ancestor_criterion.md +++ b/docs/search/criteria_reference/ancestor_criterion.md @@ -10,12 +10,18 @@ The [`Ancestor` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-C - `value` - array of location pathStrings +## Limitations + +`Ancestor` can be used on all search engines. + ## Example ### PHP -``` php -$query->query = new Criterion\Ancestor([$this->locationService->loadLocation(62)->pathString]); +```php +$query->query = new Criterion\Ancestor([ + $this->locationService->loadLocation(62)->pathString +]); ``` ### REST API @@ -33,9 +39,14 @@ $query->query = new Criterion\Ancestor([$this->locationService->loadLocation(62) === "JSON" ```json - "Query": { - "Filter": { - "AncestorCriterion": "/81/82/" + { + "ViewInput": { + "identifier": "AncestorCriterionTest", + "Query": { + "Filter": { + "AncestorCriterion": "/81/82/" + } + } } } ``` @@ -44,9 +55,11 @@ $query->query = new Criterion\Ancestor([$this->locationService->loadLocation(62) You can use the Ancestor Search Criterion to create a list of breadcrumbs leading to the Location: -``` php hl_lines="2" +```php hl_lines="2-4" $query = new LocationQuery(); -$query->query = new Criterion\Ancestor([$this->locationService->loadLocation($locationId)->pathString]); +$query->query = new Criterion\Ancestor([ + $this->locationService->loadLocation($locationId)->pathString +]); $results = $this->searchService->findLocations($query); $breadcrumbs = []; @@ -59,7 +72,7 @@ return $this->render('parts/breadcrumbs.html.twig', [ ]); ``` -``` html+twig +```html+twig {% for breadcrumb in breadcrumbs %} {% if not loop.first %} -> {% endif %} {% if not loop.last %} diff --git a/docs/search/criteria_reference/contentid_criterion.md b/docs/search/criteria_reference/contentid_criterion.md index 4951b4683d..bc6dd7a470 100644 --- a/docs/search/criteria_reference/contentid_criterion.md +++ b/docs/search/criteria_reference/contentid_criterion.md @@ -10,11 +10,15 @@ The [`ContentId` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa- - `value` - int(s) representing the Content ID(s) +## Limitations + +`ContentId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ContentId([62, 64]); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\ContentId([62, 64]); === "JSON" ```json - "Query": { - "Filter": { - "ContentIdCriterion": [69, 72] + { + "ViewInput": { + "identifier": "ContentIdCriterionTest", + "Query": { + "Filter": { + "ContentIdCriterion": [69, 72] + } + } } } ``` diff --git a/docs/search/criteria_reference/contentname_criterion.md b/docs/search/criteria_reference/contentname_criterion.md index 3bb4017422..1154cd81f0 100644 --- a/docs/search/criteria_reference/contentname_criterion.md +++ b/docs/search/criteria_reference/contentname_criterion.md @@ -10,11 +10,15 @@ The [`ContentName` Search Criterion](https://github.com/ibexa/core/blob/main/src - `value` - string representing the content name, the wildcard character `*` can be used for partial search +## Limitations + +`ContentName` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ContentName('*phone'); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\ContentName('*phone'); === "JSON" ```json - "Query": { - "Filter": { - "ContentNameCriterion": "*phone" + { + "ViewInput": { + "identifier": "ContentNameCriterionTest", + "Query": { + "Filter": { + "ContentNameCriterion": "*phone" + } + } } } - ``` \ No newline at end of file + ``` diff --git a/docs/search/criteria_reference/contenttypegroupid_criterion.md b/docs/search/criteria_reference/contenttypegroupid_criterion.md index 8cc1a6ceca..344d5c8a64 100644 --- a/docs/search/criteria_reference/contenttypegroupid_criterion.md +++ b/docs/search/criteria_reference/contenttypegroupid_criterion.md @@ -10,11 +10,15 @@ The [`ContentTypeGroupId` Search Criterion](/api/php_api/php_api_reference/class - `value` - int(s) representing the content type group ID(s) +## Limitations + +`ContentTypeGroupId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ContentTypeGroupId([1, 2]); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\ContentTypeGroupId([1, 2]); === "JSON" ```json - "Query": { - "Filter": { - "ContentTypeGroupIdCriterion": [1, 2] + { + "ViewInput": { + "identifier": "ContentTypeGroupIdCriterionTest", + "Query": { + "Filter": { + "ContentTypeGroupIdCriterion": [1, 2] + } + } } } ``` @@ -71,9 +80,14 @@ You can use the `ContentTypeGroupId` Criterion to query all Media content items === "JSON" ```json - "Query": { - "Filter": { - "ContentIdCriterion": [69, 72] + { + "ViewInput": { + "identifier": "ContentIdCriterionTest", + "Query": { + "Filter": { + "ContentIdCriterion": [69, 72] + } } } + } ``` diff --git a/docs/search/criteria_reference/contenttypeid_criterion.md b/docs/search/criteria_reference/contenttypeid_criterion.md index 2c8301358d..130a79e456 100644 --- a/docs/search/criteria_reference/contenttypeid_criterion.md +++ b/docs/search/criteria_reference/contenttypeid_criterion.md @@ -10,11 +10,15 @@ The [`ContentTypeId` Search Criterion](/api/php_api/php_api_reference/classes/Ib - `value` - int(s) representing the content type ID(s) +## Limitations + +`ContentTypeId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ContentTypeId([44]); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\ContentTypeId([44]); === "JSON" ```json - "Query": { - "Filter": { - "ContentTypeIdCriterion": 44 + { + "ViewInput": { + "identifier": "ContentTypeIdCriterionTest", + "Query": { + "Filter": { + "ContentTypeIdCriterion": 44 + } + } } } ``` diff --git a/docs/search/criteria_reference/contenttypeidentifier_criterion.md b/docs/search/criteria_reference/contenttypeidentifier_criterion.md index 8cb8995a9e..a38b93c306 100644 --- a/docs/search/criteria_reference/contenttypeidentifier_criterion.md +++ b/docs/search/criteria_reference/contenttypeidentifier_criterion.md @@ -10,11 +10,15 @@ The [`ContentTypeIdentifier` Search Criterion](/api/php_api/php_api_reference/cl - `value` - string(s) representing the content type identifier(s) +## Limitations + +`ContentTypeIdentifier` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ContentTypeIdentifier(['article', 'blog_post']); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\ContentTypeIdentifier(['article', 'blog_post']); === "JSON" ```json - "Query": { - "Filter": { - "ContentTypeIdentifierCriterion": "article" + { + "ViewInput": { + "identifier": "ContentTypeIdentifierCriterionTest", + "Query": { + "Filter": { + "ContentTypeIdentifierCriterion": "article" + } + } } } ``` diff --git a/docs/search/criteria_reference/currencycode_criterion.md b/docs/search/criteria_reference/currencycode_criterion.md index c98073e693..bdf13c0ce5 100644 --- a/docs/search/criteria_reference/currencycode_criterion.md +++ b/docs/search/criteria_reference/currencycode_criterion.md @@ -18,6 +18,6 @@ The `CurrencyCodeCriterion` Criterion isn't available in Solr or Elasticsearch e ### PHP -``` php +```php $query->query = new \Ibexa\Contracts\ProductCatalog\Values\Currency\Query\Criterion\CurrencyCodeCriterion('EUR'); ``` diff --git a/docs/search/criteria_reference/customergroupid_criterion.md b/docs/search/criteria_reference/customergroupid_criterion.md index 4a27b612c6..f486c7ce9e 100644 --- a/docs/search/criteria_reference/customergroupid_criterion.md +++ b/docs/search/criteria_reference/customergroupid_criterion.md @@ -10,10 +10,14 @@ The `CustomerGroupId` Search Criterion searches for content based on the ID of i - `value` - int(s) representing the customer group ID(s) +## Limitations + +`CustomerGroupId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\CustomerGroupId(1); ``` diff --git a/docs/search/criteria_reference/datemetadata_criterion.md b/docs/search/criteria_reference/datemetadata_criterion.md index 6ffe43359c..685fe4c756 100644 --- a/docs/search/criteria_reference/datemetadata_criterion.md +++ b/docs/search/criteria_reference/datemetadata_criterion.md @@ -12,11 +12,15 @@ The [`DateMetadata` Search Criterion](/api/php_api/php_api_reference/classes/Ibe - `operator` - Operator constant (IN, EQ, GT, GTE, LT, LTE, BETWEEN) - `value` - indicating the date(s) that should be matched, provided as a UNIX timestamp (or array of timestamps) +## Limitations + +`DateMetadata` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\DateMetadata( Criterion\DateMetadata::CREATED, Criterion\Operator::BETWEEN, @@ -43,15 +47,20 @@ $query->query = new Criterion\DateMetadata( === "JSON" ```json - "Query": { - "Filter": { - "DateMetadataCriterion": { - "Target": "modified", - "Value": 1675681020, - "Operator": "gte" + { + "ViewInput": { + "identifier": "DateMetadataCriterionTest", + "Query": { + "Filter": { + "DateMetadataCriterion": { + "Target": "modified", + "Value": 1675681020, + "Operator": "gte" + } } } } + } ``` diff --git a/docs/search/criteria_reference/depth_criterion.md b/docs/search/criteria_reference/depth_criterion.md index 1389da5b42..3ba89603ca 100644 --- a/docs/search/criteria_reference/depth_criterion.md +++ b/docs/search/criteria_reference/depth_criterion.md @@ -19,10 +19,14 @@ The `value` argument requires: - exactly two ints for `Operator::BETWEEN` - a single int for other Operators +## Limitations + +`Depth` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Location\Depth(Criterion\Operator::LT, 3); ``` diff --git a/docs/search/criteria_reference/field_criterion.md b/docs/search/criteria_reference/field_criterion.md index 4536a5a2ff..65563eccba 100644 --- a/docs/search/criteria_reference/field_criterion.md +++ b/docs/search/criteria_reference/field_criterion.md @@ -21,12 +21,11 @@ Querying for a collection with the `EQ` operator returns result only when the wh The `Field` Criterion isn't available in [Repository filtering](search_api.md#repository-filtering). - ## Example ### PHP -``` php +```php $query->query = new Criterion\Field('name', Criterion\Operator::CONTAINS, 'Platform'); ``` @@ -50,12 +49,15 @@ $query->query = new Criterion\Field('name', Criterion\Operator::CONTAINS, 'Platf ```json { - "Query": { - "Filter": { - "Field": { - "name": "name", - "operator": "CONTAINS", - "value": "Platform" + "ViewInput": { + "identifier": "FieldTest", + "Query": { + "Filter": { + "Field": { + "name": "name", + "operator": "CONTAINS", + "value": "Platform" + } } } } diff --git a/docs/search/criteria_reference/fieldrelation_criterion.md b/docs/search/criteria_reference/fieldrelation_criterion.md index cf2103597f..81135c21b6 100644 --- a/docs/search/criteria_reference/fieldrelation_criterion.md +++ b/docs/search/criteria_reference/fieldrelation_criterion.md @@ -22,6 +22,6 @@ The `FieldRelation` Criterion isn't available in [Repository filtering](search_a ### PHP -``` php +```php $query->query = new Criterion\FieldRelation('relations', Criterion\Operator::CONTAINS, [55, 63]); ``` diff --git a/docs/search/criteria_reference/fulltext_criterion.md b/docs/search/criteria_reference/fulltext_criterion.md index 2b55be4ecf..f7d093e5e8 100644 --- a/docs/search/criteria_reference/fulltext_criterion.md +++ b/docs/search/criteria_reference/fulltext_criterion.md @@ -27,7 +27,6 @@ The [`FullText` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-C \*\*\* Asteriks may only be located at the beginning or end of a query. - ## Limitations When using the Legacy search engine, a full text query performs an OR query by default, and @@ -41,19 +40,19 @@ The `FullText` Criterion isn't available in [Repository filtering](search_api.md ### PHP -``` php +```php $query->query = new Criterion\FullText('victory'); ``` Using double quotes to indicate a phrase: -``` php +```php $query->query = new Criterion\FullText('"world cup"'); ``` Using the AND operator and parenthesis to search for both words at the same time: -``` php +```php $query->query = new Criterion\FullText('baseball AND cup'); ``` @@ -72,9 +71,14 @@ $query->query = new Criterion\FullText('baseball AND cup'); === "JSON" ```json - "Query": { - "Filter": { - "FullTextCriterion": "victory" + { + "ViewInput": { + "identifier": "FullTextCriterionTest", + "Query": { + "Filter": { + "FullTextCriterion": "victory" + } + } } } ``` diff --git a/docs/search/criteria_reference/image_criterion.md b/docs/search/criteria_reference/image_criterion.md index 6bd91f64cd..175d7b0054 100644 --- a/docs/search/criteria_reference/image_criterion.md +++ b/docs/search/criteria_reference/image_criterion.md @@ -11,11 +11,15 @@ The `Image` Search Criterion searches for image by specified image attributes. - `fieldDefIdentifier` - string representing the identifier of the field - `imageCriteriaData` - array representing image attributes. All attributes are optional. +## Limitations + +`Image` can be used on all search engines. + ## Example ### PHP -``` php +```php $imageCriteriaData = [ 'mimeTypes' => [ 'image/png', @@ -70,52 +74,62 @@ $query->query = new Criterion\Image('image', $imageCriteriaData); === "JSON" ```json - "Query": { - "Filter": { - "ImageCriterion": { - "fieldDefIdentifier": "image", - "mimeTypes": "image/png", - "size": { - "max": 1.5 - }, - "width": { - "max": 1000 - }, - "height": { - "max": 1500 - }, - "orientation": "portrait" - } - } + { + "ViewInput": { + "identifier": "ImageCriterionTest", + "Query": { + "Filter": { + "ImageCriterion": { + "fieldDefIdentifier": "image", + "mimeTypes": "image/png", + "size": { + "max": 1.5 + }, + "width": { + "max": 1000 + }, + "height": { + "max": 1500 + }, + "orientation": "portrait" + } + } + } + } } OR - "Query": { - "Filter": { - "ImageCriterion": { - "fieldDefIdentifier": "image", - "mimeTypes": [ - "image/png", - "image/jpeg" - ], - "size": { - "min": 0, - "max": 2 - }, - "width": { - "min": 100, - "max": 1000 - }, - "height": { - "min": 500, - "max": 1500 - }, - "orientation": [ - "portrait", - "landscape" - ] - } - } + { + "ViewInput": { + "identifier": "ImageCriterionTest", + "Query": { + "Filter": { + "ImageCriterion": { + "fieldDefIdentifier": "image", + "mimeTypes": [ + "image/png", + "image/jpeg" + ], + "size": { + "min": 0, + "max": 2 + }, + "width": { + "min": 100, + "max": 1000 + }, + "height": { + "min": 500, + "max": 1500 + }, + "orientation": [ + "portrait", + "landscape" + ] + } + } + } + } } - ``` \ No newline at end of file + ``` diff --git a/docs/search/criteria_reference/imagedimensions_criterion.md b/docs/search/criteria_reference/imagedimensions_criterion.md index 20efff7d87..198004bc54 100644 --- a/docs/search/criteria_reference/imagedimensions_criterion.md +++ b/docs/search/criteria_reference/imagedimensions_criterion.md @@ -11,11 +11,15 @@ The `Dimensions` Search Criterion searches for image with specified dimensions. - `fieldDefIdentifier` - string representing the identifier of the field - `imageCriteriaData` - an array representing minimum and maximum values for width and height, expressed in pixels +## Limitations + +`ImageDimensions` can be used on all search engines. + ## Example ### PHP -``` php +```php $imageCriteriaData = [ 'width' => [ 'min' => 100, // (default: 0, optional) @@ -55,19 +59,24 @@ $query->query = new Criterion\Dimensions('image', $imageCriteriaData); === "JSON" ```json - "Query": { - "Filter": { - "ImageDimensionsCriterion": { - "fieldDefIdentifier": "image", - "width": { - "min": 100, - "max": 1000 - }, - "height": { - "min": 500, - "max": 1500 + { + "ViewInput": { + "identifier": "ImageDimensionsCriterionTest", + "Query": { + "Filter": { + "ImageDimensionsCriterion": { + "fieldDefIdentifier": "image", + "width": { + "min": 100, + "max": 1000 + }, + "height": { + "min": 500, + "max": 1500 + } + } } } } } - ``` \ No newline at end of file + ``` diff --git a/docs/search/criteria_reference/imagefilesize_criterion.md b/docs/search/criteria_reference/imagefilesize_criterion.md index 5a0f1170e2..a6a82bf97b 100644 --- a/docs/search/criteria_reference/imagefilesize_criterion.md +++ b/docs/search/criteria_reference/imagefilesize_criterion.md @@ -12,11 +12,15 @@ The `FileSize` Search Criterion searches for image with specified size. - (optional) `minValue` - numeric representing minimum file size expressed in MB, default: 0 - (optional) `maxValue` - numeric representing maximum file size expressed in MB, default: `null` +## Limitations + +`ImageFileSize` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\FileSize('image', 0, 1.5); ``` @@ -41,15 +45,20 @@ $query->query = new Criterion\FileSize('image', 0, 1.5); === "JSON" ```json - "Query": { - "Filter": { - "ImageFileSizeCriterion":{ - "fieldDefIdentifier": "image", - "size": { - "min": 0, - "max": 1.5 + { + "ViewInput": { + "identifier": "ImageFileSizeCriterionTest", + "Query": { + "Filter": { + "ImageFileSizeCriterion":{ + "fieldDefIdentifier": "image", + "size": { + "min": 0, + "max": 1.5 + } + } } } } } - ``` \ No newline at end of file + ``` diff --git a/docs/search/criteria_reference/imageheight_criterion.md b/docs/search/criteria_reference/imageheight_criterion.md index 5f1ff96c79..29f127a4f2 100644 --- a/docs/search/criteria_reference/imageheight_criterion.md +++ b/docs/search/criteria_reference/imageheight_criterion.md @@ -12,10 +12,14 @@ The `Height` Search Criterion searches for image with specified height. - (optional) `minValue` - int representing minimum file height expressed in pixels, default: 0 - (optional) `maxValue` - int representing maximum file height expressed in pixels, default: `null` +## Limitations + +`ImageHeight` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Height('image', 0, 1500); ``` diff --git a/docs/search/criteria_reference/imagemimetype_criterion.md b/docs/search/criteria_reference/imagemimetype_criterion.md index 96a12a78de..41983179bc 100644 --- a/docs/search/criteria_reference/imagemimetype_criterion.md +++ b/docs/search/criteria_reference/imagemimetype_criterion.md @@ -11,11 +11,15 @@ The `MimeType` Search Criterion searches for image with specified mime type(s). - `fielDefIdentifier` - string representing the identifier of the field - `type` - string(s) representing mime type(s) +## Limitations + +`ImageMimeType` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\MimeType('image', 'image/jpeg'); ``` @@ -48,23 +52,33 @@ $query->query = new Criterion\MimeType('image', $mimeTypes); === "JSON" ```json - "Query": { - "Filter": { - "ImageMimeTypeCriterion": { - "fieldDefIdentifier": "image", - "type": "image/png" + { + "ViewInput": { + "identifier": "ImageMimeTypeCriterionTest", + "Query": { + "Filter": { + "ImageMimeTypeCriterion": { + "fieldDefIdentifier": "image", + "type": "image/png" + } + } } } } OR - "Query": { - "Filter": { - "ImageMimeTypeCriterion": { - "fieldDefIdentifier": "image", - "type": ["image/png", "image/jpeg"] + { + "ViewInput": { + "identifier": "ImageMimeTypeCriterionTest", + "Query": { + "Filter": { + "ImageMimeTypeCriterion": { + "fieldDefIdentifier": "image", + "type": ["image/png", "image/jpeg"] + } + } } } } - ``` \ No newline at end of file + ``` diff --git a/docs/search/criteria_reference/imageorientation_criterion.md b/docs/search/criteria_reference/imageorientation_criterion.md index 3b7f57b453..e7d289b80a 100644 --- a/docs/search/criteria_reference/imageorientation_criterion.md +++ b/docs/search/criteria_reference/imageorientation_criterion.md @@ -12,14 +12,18 @@ Supported orientation values: landscape, portrait and square. - `fielDefIdentifier` - string representing the identifier of the field - `orientation` - strings representing orientations +## Limitations + +`ImageOrientation` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Orientation('image', 'landscape'); -OR +// OR $orientations = [ 'landscape', @@ -47,23 +51,33 @@ $query->query = new Criterion\Orientation('image', $orientations); === "JSON" ```json - "Query": { - "Filter": { - "ImageOrientationCriterion": { - "fieldDefIdentifier": "image", - "orientation": "landscape" + { + "ViewInput": { + "identifier": "ImageOrientationCriterionTest", + "Query": { + "Filter": { + "ImageOrientationCriterion": { + "fieldDefIdentifier": "image", + "orientation": "landscape" + } + } } } } OR - "Query": { - "Filter": { - "ImageOrientationCriterion": { - "fieldDefIdentifier": "image", - "orientation": ["portrait", "landscape"] + { + "ViewInput": { + "identifier": "ImageOrientationCriterionTest", + "Query": { + "Filter": { + "ImageOrientationCriterion": { + "fieldDefIdentifier": "image", + "orientation": ["portrait", "landscape"] + } + } } } } - ``` \ No newline at end of file + ``` diff --git a/docs/search/criteria_reference/imagewidth_criterion.md b/docs/search/criteria_reference/imagewidth_criterion.md index 34ec3293c7..351385b82f 100644 --- a/docs/search/criteria_reference/imagewidth_criterion.md +++ b/docs/search/criteria_reference/imagewidth_criterion.md @@ -12,10 +12,14 @@ The `Width` Search Criterion searches for image with specified width. - (optional) `minValue` - int representing minimum file width expressed in pixels, default: 0 - (optional) `maxValue` - int representing maximum file width expressed in pixels, default: `null` +## Limitations + +`ImageWidth` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Width('image', 150, 1000); ``` diff --git a/docs/search/criteria_reference/isbookmarked_criterion.md b/docs/search/criteria_reference/isbookmarked_criterion.md index a3e6f12105..47e80f0853 100644 --- a/docs/search/criteria_reference/isbookmarked_criterion.md +++ b/docs/search/criteria_reference/isbookmarked_criterion.md @@ -15,11 +15,15 @@ This Criterion is available only for location Search. - `value` - bool representing whether to search for bookmarked location (default `true`) or not bookmarked location (`false`) +## Limitations + +`IsBookmarked` can be used on all search engines. + ## Example ### PHP -``` php +```php [[= include_file('code_samples/search/location/isbookmarked_criterion.php', 2) =]] ``` @@ -38,9 +42,14 @@ This Criterion is available only for location Search. === "JSON" ```json - "Query": { - "Filter": { - "IsBookmarkedCriterion": true + { + "ViewInput": { + "identifier": "IsBookmarkedCriterionTest", + "Query": { + "Filter": { + "IsBookmarkedCriterion": true + } + } } } ``` diff --git a/docs/search/criteria_reference/iscontainer_criterion.md b/docs/search/criteria_reference/iscontainer_criterion.md new file mode 100644 index 0000000000..630410e21e --- /dev/null +++ b/docs/search/criteria_reference/iscontainer_criterion.md @@ -0,0 +1,24 @@ +--- +description: IsContainer Search Criterion +--- + +# IsContainer Criterion + +The [`IsContainer` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-IsContainer.html) searches for content items based on whether they are containers (i.e., can contain other content items). + +## Arguments + +- `value` – boolean (optional, default: `true`). If `true`, searches for content that is a container. If `false`, searches for content that is not a container. + +## Limitations + +The `IsContainer` Criterion can be used on all search engines. + +## Example + +### PHP + +```php +$query->query = new Criterion\IsContainer(); // Finds containers +$query->query = new Criterion\IsContainer(false); // Finds non-containers +``` diff --git a/docs/search/criteria_reference/iscurrencyenabled_criterion.md b/docs/search/criteria_reference/iscurrencyenabled_criterion.md index 1985d5f8e2..7787c52aa4 100644 --- a/docs/search/criteria_reference/iscurrencyenabled_criterion.md +++ b/docs/search/criteria_reference/iscurrencyenabled_criterion.md @@ -19,6 +19,6 @@ The `IsCurrencyEnabledCriterion` Criterion isn't available in Solr or Elasticsea ### PHP -``` php +```php $query->query = new \Ibexa\Contracts\ProductCatalog\Values\Currency\Query\Criterion\IsCurrencyEnabledCriterion(); ``` diff --git a/docs/search/criteria_reference/isfieldempty_criterion.md b/docs/search/criteria_reference/isfieldempty_criterion.md index a6bf07844a..1ed8339826 100644 --- a/docs/search/criteria_reference/isfieldempty_criterion.md +++ b/docs/search/criteria_reference/isfieldempty_criterion.md @@ -22,7 +22,7 @@ The Richtext field type (`ibexa_richtext`) isn't searchable in the Legacy search ### PHP -``` php +```php $query->query = new Criterion\IsFieldEmpty('title'); ``` diff --git a/docs/search/criteria_reference/ismainlocation_criterion.md b/docs/search/criteria_reference/ismainlocation_criterion.md index 8b0172d691..596f1e8f7d 100644 --- a/docs/search/criteria_reference/ismainlocation_criterion.md +++ b/docs/search/criteria_reference/ismainlocation_criterion.md @@ -13,10 +13,14 @@ This Criterion is available only for Location Search. - `value` - `IsMainLocation::MAIN` (0) or `IsMainLocation::NOT_MAIN` (1), representing whether to search for a main or not main location +## Limitations + +`IsMainLocation` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Location\IsMainLocation(IsMainLocation::MAIN); ``` diff --git a/docs/search/criteria_reference/isproductbased_criterion.md b/docs/search/criteria_reference/isproductbased_criterion.md index 077682c18f..b144fe200e 100644 --- a/docs/search/criteria_reference/isproductbased_criterion.md +++ b/docs/search/criteria_reference/isproductbased_criterion.md @@ -6,10 +6,18 @@ description: IsProductBased Search Criterion The `IsProductBased` Search Criterion searches for content that plays the role of a Product. +## Arguments + +This criterion does not require any arguments. + +## Limitations + +`IsProductBased` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Ibexa\Contracts\ProductCatalog\Values\Content\Query\Criterion\IsProductBased(); ``` diff --git a/docs/search/criteria_reference/isuserbased_criterion.md b/docs/search/criteria_reference/isuserbased_criterion.md index c3302d0db0..3175ee9a5e 100644 --- a/docs/search/criteria_reference/isuserbased_criterion.md +++ b/docs/search/criteria_reference/isuserbased_criterion.md @@ -24,7 +24,7 @@ The `IsUserBased` Criterion isn't available in Solr or Elasticsearch engines. ### PHP -``` php +```php $query->query = new Criterion\IsUserBased(); ``` @@ -43,9 +43,14 @@ $query->query = new Criterion\IsUserBased(); === "JSON" ```json - "Query": { - "Filter": { - "IsUserBasedCriterion": "false" + { + "ViewInput": { + "identifier": "IsUserBasedCriterionTest", + "Query": { + "Filter": { + "IsUserBasedCriterion": false + } + } } } ``` diff --git a/docs/search/criteria_reference/isuserenabled_criterion.md b/docs/search/criteria_reference/isuserenabled_criterion.md index d95e3b29ad..fe87ab4210 100644 --- a/docs/search/criteria_reference/isuserenabled_criterion.md +++ b/docs/search/criteria_reference/isuserenabled_criterion.md @@ -11,11 +11,15 @@ The [`IsUserEnabled` Search Criterion](/api/php_api/php_api_reference/classes/Ib - (optional) `value` - bool representing whether to search for enabled (default `true`) or disabled user accounts +## Limitations + +`IsUserEnabled` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\IsUserEnabled(); ``` @@ -34,9 +38,14 @@ $query->query = new Criterion\IsUserEnabled(); === "JSON" ```json - "Query": { - "Filter": { - "IsUserEnabledCriterion": "true" + { + "ViewInput": { + "identifier": "IsUserEnabledCriterionTest", + "Query": { + "Filter": { + "IsUserEnabledCriterion": "true" + } + } } } ``` diff --git a/docs/search/criteria_reference/languagecode_criterion.md b/docs/search/criteria_reference/languagecode_criterion.md index b4a977db2f..a1c29d59e9 100644 --- a/docs/search/criteria_reference/languagecode_criterion.md +++ b/docs/search/criteria_reference/languagecode_criterion.md @@ -11,11 +11,15 @@ The [`LanguageCode` Search Criterion](/api/php_api/php_api_reference/classes/Ibe - `value` - string(s) representing the language codes to search for - (optional) `matchAlwaysAvailable` - bool representing whether content with the `alwaysAvailable` flag should be returned even if it doesn't contain the selected language (default `true`) +## Limitations + +`LanguageCode` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\LanguageCode('ger-DE', false); ``` @@ -34,9 +38,14 @@ $query->query = new Criterion\LanguageCode('ger-DE', false); === "JSON" ```json - "Query": { - "Filter": { - "LanguageCodeCriterion": "eng-GB" + { + "ViewInput": { + "identifier": "LanguageCodeCriterionTest", + "Query": { + "Filter": { + "LanguageCodeCriterion": "eng-GB" + } + } } } ``` diff --git a/docs/search/criteria_reference/locationid_criterion.md b/docs/search/criteria_reference/locationid_criterion.md index 63169e9c71..2b95577951 100644 --- a/docs/search/criteria_reference/locationid_criterion.md +++ b/docs/search/criteria_reference/locationid_criterion.md @@ -10,11 +10,15 @@ The [`LocationId` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa - `value` - int(s) representing the location ID(s) +## Limitations + +`LocationId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\LocationId(62); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\LocationId(62); === "JSON" ```json - "Query": { - "Filter": { - "LocationIdCriterion": "62" + { + "ViewInput": { + "identifier": "LocationIdCriterionTest", + "Query": { + "Filter": { + "LocationIdCriterion": "62" + } + } } } ``` diff --git a/docs/search/criteria_reference/locationremoteid_criterion.md b/docs/search/criteria_reference/locationremoteid_criterion.md index d79bfd1aec..2b3b337313 100644 --- a/docs/search/criteria_reference/locationremoteid_criterion.md +++ b/docs/search/criteria_reference/locationremoteid_criterion.md @@ -10,11 +10,15 @@ The [`LocationRemoteId` Search Criterion](/api/php_api/php_api_reference/classes - `value` - string(s) representing the location remote ID(s) +## Limitations + +`LocationRemoteId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\LocationRemoteId(['4d1e5f216c0a7aaab7f005ffd4b6a8a8', 'b81ef3e62b514188bfddd2a80d447d34']); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\LocationRemoteId(['4d1e5f216c0a7aaab7f005ffd4b6a8a === "JSON" ```json - "Query": { - "Filter": { - "LocationRemoteIdCriterion": "3aaeefdb0ae573ac91f6d6ea78d230b7" + { + "ViewInput": { + "identifier": "LocationRemoteIdCriterionTest", + "Query": { + "Filter": { + "LocationRemoteIdCriterion": "3aaeefdb0ae573ac91f6d6ea78d230b7" + } + } } } ``` diff --git a/docs/search/criteria_reference/logicaland_criterion.md b/docs/search/criteria_reference/logicaland_criterion.md index 4811be9f5a..1397477805 100644 --- a/docs/search/criteria_reference/logicaland_criterion.md +++ b/docs/search/criteria_reference/logicaland_criterion.md @@ -10,16 +10,19 @@ The [`LogicalAnd` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa - `criterion` - a set of Criteria combined by the logical operator +## Limitations + +`LogicalAnd` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\LogicalAnd([ - new Criterion\ContentTypeIdentifier('article'), - new Criterion\SectionIdentifier(['sports', 'news']); - ] -); + new Criterion\ContentTypeIdentifier('article'), + new Criterion\SectionIdentifier(['sports', 'news']) +]); ``` ### REST API diff --git a/docs/search/criteria_reference/logicalnot_criterion.md b/docs/search/criteria_reference/logicalnot_criterion.md index 444c2702fb..b26f79c15b 100644 --- a/docs/search/criteria_reference/logicalnot_criterion.md +++ b/docs/search/criteria_reference/logicalnot_criterion.md @@ -4,7 +4,7 @@ description: LogicalNot Search Criterion # LogicalNot Criterion -The [`LogicalNot` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-LogicalNot.html) matches content URL if the provided Criterion doesn't match. +The [`LogicalNot` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-LogicalNot.html) matches content if the provided Criterion doesn't match. It takes only one Criterion in the array parameter. @@ -12,9 +12,15 @@ It takes only one Criterion in the array parameter. - `criterion` - represents the Criterion that should be negated +## Limitations + +`LogicalNot` can be used on all search engines. + ## Example -``` php +### PHP + +```php $query->filter = new Criterion\LogicalNot( new Criterion\ContentTypeIdentifier($contentTypeId) ); diff --git a/docs/search/criteria_reference/logicalor_criterion.md b/docs/search/criteria_reference/logicalor_criterion.md index 9a720b20be..be1b602bcf 100644 --- a/docs/search/criteria_reference/logicalor_criterion.md +++ b/docs/search/criteria_reference/logicalor_criterion.md @@ -10,16 +10,19 @@ The [`LogicalOr` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa- - `criterion` - a set of Criteria combined by the logical operator +## Limitations + +`LogicalOr` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->filter = new Criterion\LogicalOr([ - new Criterion\ContentTypeIdentifier('article'), - new Criterion\SectionIdentifier(['sports', 'news']); - ] -); + new Criterion\ContentTypeIdentifier('article'), + new Criterion\SectionIdentifier(['sports', 'news']) +]); ``` ### REST API diff --git a/docs/search/criteria_reference/maplocationdistance_criterion.md b/docs/search/criteria_reference/maplocationdistance_criterion.md index 6592008687..a64d5cef25 100644 --- a/docs/search/criteria_reference/maplocationdistance_criterion.md +++ b/docs/search/criteria_reference/maplocationdistance_criterion.md @@ -27,6 +27,6 @@ The `MapLocationDistance` Criterion isn't available in [Repository filtering](se ### PHP -``` php +```php $query->query = new Criterion\MapLocationDistance('location', Criterion\Operator::LTE, 5, 51.395973, 22.531696); ``` diff --git a/docs/search/criteria_reference/matchall_criterion.md b/docs/search/criteria_reference/matchall_criterion.md index b9c980b7c1..ee94ab66ea 100644 --- a/docs/search/criteria_reference/matchall_criterion.md +++ b/docs/search/criteria_reference/matchall_criterion.md @@ -8,3 +8,19 @@ The [`MatchAll` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-C It's used internally when no filter or query is provided on a Query object. The Criterion takes no arguments. + +## Arguments + +This criterion does not require any arguments. + +## Limitations + +`MatchAll` can be used on all search engines. + +## Example + +### PHP + +```php +$query->query = new Criterion\MatchAll(); +``` diff --git a/docs/search/criteria_reference/matchnone_criterion.md b/docs/search/criteria_reference/matchnone_criterion.md index 87aa89292a..c8c862a67d 100644 --- a/docs/search/criteria_reference/matchnone_criterion.md +++ b/docs/search/criteria_reference/matchnone_criterion.md @@ -8,3 +8,19 @@ The [`MatchNone` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa- It's used internally when no filter or query is provided on a Query object. The Criterion takes no arguments. + +## Arguments + +This criterion does not require any arguments. + +## Limitations + +`MatchNone` can be used on all search engines. + +## Example + +### PHP + +```php +$query->query = new Criterion\MatchNone(); +``` diff --git a/docs/search/criteria_reference/objectstateid_criterion.md b/docs/search/criteria_reference/objectstateid_criterion.md index f080cbaae9..b2eff66795 100644 --- a/docs/search/criteria_reference/objectstateid_criterion.md +++ b/docs/search/criteria_reference/objectstateid_criterion.md @@ -10,11 +10,15 @@ The [`ObjectStateId` Search Criterion](/api/php_api/php_api_reference/classes/Ib - `value` - int(s) representing the object state ID(s) +## Limitations + +`ObjectStateId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ObjectStateId([4, 5]); ``` @@ -33,9 +37,14 @@ $query->query = new Criterion\ObjectStateId([4, 5]); === "JSON" ```json - "Query": { - "Filter": { - "ObjectStateIdCriterion": "1" + { + "ViewInput": { + "identifier": "ObjectStateIdCriterionTest", + "Query": { + "Filter": { + "ObjectStateIdCriterion": "1" + } + } } } ``` diff --git a/docs/search/criteria_reference/objectstateidentifier_criterion.md b/docs/search/criteria_reference/objectstateidentifier_criterion.md index 75e7153828..1a22ea8c48 100644 --- a/docs/search/criteria_reference/objectstateidentifier_criterion.md +++ b/docs/search/criteria_reference/objectstateidentifier_criterion.md @@ -11,15 +11,19 @@ The [`ObjectStateIdentifier` Search Criterion](/api/php_api/php_api_reference/cl - `value` - string(s) representing the object state identifier(s) - `target` (optional for PHP) - string representing the object state group +## Limitations + +`ObjectStateIdentifier` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ObjectStateIdentifier(['ready']); ``` -``` php +```php $query->query = new Criterion\ObjectStateIdentifier(['not_locked'], 'ibexa_lock'); ``` @@ -42,11 +46,14 @@ $query->query = new Criterion\ObjectStateIdentifier(['not_locked'], 'ibexa_lock' ```json { - "Query": { - "Filter": { - "ObjectStateIdentifierCriterion": { - "value": "not_locked", - "target": "ibexa_lock" + "ViewInput": { + "identifier": "ObjectStateIdentifierCriterionTest", + "Query": { + "Filter": { + "ObjectStateIdentifierCriterion": { + "value": "not_locked", + "target": "ibexa_lock" + } } } } diff --git a/docs/search/criteria_reference/parentlocationid_criterion.md b/docs/search/criteria_reference/parentlocationid_criterion.md index e30307eeb0..0ac58e99c7 100644 --- a/docs/search/criteria_reference/parentlocationid_criterion.md +++ b/docs/search/criteria_reference/parentlocationid_criterion.md @@ -11,11 +11,15 @@ searches for content based on the Location ID of its parent. - `value` - int(s) representing the parent location IDs +## Limitations + +`ParentLocationId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\ParentLocationId([54, 58]); ``` @@ -34,9 +38,14 @@ $query->query = new Criterion\ParentLocationId([54, 58]); === "JSON" ```json - "Query": { - "Filter": { - "ParentLocationIdCriterion": [69, 72] + { + "ViewInput": { + "identifier": "ParentLocationIdCriterionTest", + "Query": { + "Filter": { + "ParentLocationIdCriterion": [69, 72] + } + } } } ``` diff --git a/docs/search/criteria_reference/parentlocationremoteId_criterion.md b/docs/search/criteria_reference/parentlocationremoteId_criterion.md index c136361d93..b792292f6a 100644 --- a/docs/search/criteria_reference/parentlocationremoteId_criterion.md +++ b/docs/search/criteria_reference/parentlocationremoteId_criterion.md @@ -10,6 +10,17 @@ The `ParentLocationRemoteId` Search Criterion searches for content based on the - `value` - int(s) representing the parent location remote IDs +## Limitations + +`ParentLocationRemoteId` can be used on all search engines. + +## Example + +### PHP + +```php +$query->query = new Criterion\ParentLocationRemoteId(['abab615dcf26699a4291657152da4337']); +``` ### REST API @@ -26,9 +37,14 @@ The `ParentLocationRemoteId` Search Criterion searches for content based on the === "JSON" ```json - "Query": { - "Filter": { - "ParentLocationRemoteIdCriterion": "abab615dcf26699a4291657152da4337" + { + "ViewInput": { + "identifier": "ParentLocationRemoteIdCriterionTest", + "Query": { + "Filter": { + "ParentLocationRemoteIdCriterion": "abab615dcf26699a4291657152da4337" + } + } } } ``` diff --git a/docs/search/criteria_reference/priority_criterion.md b/docs/search/criteria_reference/priority_criterion.md index 34975939d0..fd2d90bbf7 100644 --- a/docs/search/criteria_reference/priority_criterion.md +++ b/docs/search/criteria_reference/priority_criterion.md @@ -18,10 +18,14 @@ The `value` argument requires: - a list of ints for `Operator::BETWEEN` - a single int for other Operators +## Limitations + +`Priority` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Location\Priority(Criterion\Operator::GTE, 50); ``` diff --git a/docs/search/criteria_reference/productstock_criterion.md b/docs/search/criteria_reference/productstock_criterion.md index d70abe9443..ed88bc178c 100644 --- a/docs/search/criteria_reference/productstock_criterion.md +++ b/docs/search/criteria_reference/productstock_criterion.md @@ -28,5 +28,3 @@ $productQuery = new ProductQuery( new Criterion\ProductStock(50, '>=') ); ``` - - diff --git a/docs/search/criteria_reference/productstockrange_criterion.md b/docs/search/criteria_reference/productstockrange_criterion.md index f81d18d6e3..f71c7f5adc 100644 --- a/docs/search/criteria_reference/productstockrange_criterion.md +++ b/docs/search/criteria_reference/productstockrange_criterion.md @@ -21,5 +21,3 @@ $productQuery = new ProductQuery( new Criterion\ProductStockRange(10, 120) ); ``` - - diff --git a/docs/search/criteria_reference/remoteid_criterion.md b/docs/search/criteria_reference/remoteid_criterion.md index 6677715cda..f0638160f0 100644 --- a/docs/search/criteria_reference/remoteid_criterion.md +++ b/docs/search/criteria_reference/remoteid_criterion.md @@ -11,11 +11,15 @@ searches for content based on its remote content ID. - `value` - string(s) representing the remote IDs +## Limitations + +`RemoteId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\RemoteId('abab615dcf26699a4291657152da4337'); ``` @@ -34,9 +38,14 @@ $query->query = new Criterion\RemoteId('abab615dcf26699a4291657152da4337'); === "JSON" ```json - "Query": { - "Filter": { - "ContentRemoteIdCriterion": "abab615dcf26699a4291657152da4337" + { + "ViewInput": { + "identifier": "ContentRemoteIdCriterionTest", + "Query": { + "Filter": { + "ContentRemoteIdCriterion": "abab615dcf26699a4291657152da4337" + } + } } } ``` diff --git a/docs/search/criteria_reference/sectionid_criterion.md b/docs/search/criteria_reference/sectionid_criterion.md index cfdc257ccb..45704664c1 100644 --- a/docs/search/criteria_reference/sectionid_criterion.md +++ b/docs/search/criteria_reference/sectionid_criterion.md @@ -10,11 +10,15 @@ The [`SectionId` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa- - `value` - int(s) representing the IDs of the Section(s) +## Limitations + +`SectionId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\SectionId(3); ``` diff --git a/docs/search/criteria_reference/sectionidentifier_criterion.md b/docs/search/criteria_reference/sectionidentifier_criterion.md index dea856b606..7fbc6360fe 100644 --- a/docs/search/criteria_reference/sectionidentifier_criterion.md +++ b/docs/search/criteria_reference/sectionidentifier_criterion.md @@ -10,11 +10,15 @@ The [`SectionIdentifier` Search Criterion](/api/php_api/php_api_reference/classe - `value` - string(s) representing the identifiers of the Section(s) +## Limitations + +`SectionIdentifier` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\SectionIdentifier(['sports', 'news']); ``` diff --git a/docs/search/criteria_reference/sibling_criterion.md b/docs/search/criteria_reference/sibling_criterion.md index 0a3780c3c7..8fd1201b75 100644 --- a/docs/search/criteria_reference/sibling_criterion.md +++ b/docs/search/criteria_reference/sibling_criterion.md @@ -11,25 +11,24 @@ The [`Sibling` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Co - `locationId` - int representing the location ID - `parentLocationId` - int representing the parent location ID +## Limitations + +`Sibling` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Sibling(59, 2); -``` -You can also use the named constructor `Criterion\Sibling::fromLocation` and provide it with the location object: - -``` php +// Or using the named constructor $location = $locationService->loadLocation(59); $query->query = Criterion\Sibling::fromLocation($location); ``` ### REST API -### REST API - === "XML" ```xml diff --git a/docs/search/criteria_reference/subtree_criterion.md b/docs/search/criteria_reference/subtree_criterion.md index a814f314fa..d467e0c07a 100644 --- a/docs/search/criteria_reference/subtree_criterion.md +++ b/docs/search/criteria_reference/subtree_criterion.md @@ -4,18 +4,21 @@ description: Subtree Search Criterion # Subtree Criterion -The [`Subtree` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-Subtree.html) searches for content based on its location ID subtree path. -It returns the content item and all the content items below it in the subtree. +The [`Subtree` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-Query-Criterion-Subtree.html) searches for content based on its location ID subtree path. It returns the content item and all the content items below it in the subtree. ## Arguments - `value` - string(s) representing the pathstring(s) to search for +## Limitations + +`Subtree` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Subtree('/1/2/71/72/'); ``` diff --git a/docs/search/criteria_reference/taxonomy_entry_id.md b/docs/search/criteria_reference/taxonomy_entry_id.md index 1cceaeccc2..a94318ccfd 100644 --- a/docs/search/criteria_reference/taxonomy_entry_id.md +++ b/docs/search/criteria_reference/taxonomy_entry_id.md @@ -10,16 +10,16 @@ The [`TaxonomyEntryId` Search Criterion](/api/php_api/php_api_reference/classes/ - `value` - int(s) representing the IDs of the Tag(s) -## Example +## Limitations -### PHP +`TaxonomyEntryId` can be used on all search engines. -``` php -$query->query = new Criterion\TaxonomyEntryId(1); -``` +## Example -Add an array of ID's to find Content tagged with at least one of the tags (OR). +### PHP ```php +$query->query = new Criterion\TaxonomyEntryId(1); +// Or with multiple IDs $query->query = new Criterion\TaxonomyEntryId([1, 2, 3]); ``` diff --git a/docs/search/criteria_reference/useremail_criterion.md b/docs/search/criteria_reference/useremail_criterion.md index 7cc730e21f..6f60caf204 100644 --- a/docs/search/criteria_reference/useremail_criterion.md +++ b/docs/search/criteria_reference/useremail_criterion.md @@ -19,11 +19,8 @@ Solr search engine and Elasticsearch support IN and EQ operators only. ### PHP -``` php +```php $query->query = new Criterion\UserEmail(['johndoe']); -``` - -``` php $query->query = new Criterion\UserEmail('nospam*', Criterion\Operator::LIKE); ``` diff --git a/docs/search/criteria_reference/userid_criterion.md b/docs/search/criteria_reference/userid_criterion.md index 0468cffdbc..7656ff1fbc 100644 --- a/docs/search/criteria_reference/userid_criterion.md +++ b/docs/search/criteria_reference/userid_criterion.md @@ -10,11 +10,15 @@ The [`UserId` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa-Con - `value` - int(s) representing the User ID(s) +## Limitations + +`UserId` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\UserId([14]); ``` diff --git a/docs/search/criteria_reference/userlogin_criterion.md b/docs/search/criteria_reference/userlogin_criterion.md index a3c6f048b4..6e8324e551 100644 --- a/docs/search/criteria_reference/userlogin_criterion.md +++ b/docs/search/criteria_reference/userlogin_criterion.md @@ -19,11 +19,8 @@ Solr search engine and Elasticsearch support IN and EQ operators only. ### PHP -``` php +```php $query->query = new Criterion\UserLogin(['johndoe']); -``` - -``` php $query->query = new Criterion\UserLogin('adm*', Criterion\Operator::LIKE); ``` diff --git a/docs/search/criteria_reference/usermetadata_criterion.md b/docs/search/criteria_reference/usermetadata_criterion.md index 54a9d0725b..cf630cb912 100644 --- a/docs/search/criteria_reference/usermetadata_criterion.md +++ b/docs/search/criteria_reference/usermetadata_criterion.md @@ -12,11 +12,15 @@ The [`UserMetadata` Search Criterion](/api/php_api/php_api_reference/classes/Ibe - `operator` - Operator constant (EQ, IN) - `value` - int(s) representing the User IDs or user group IDs (in case of the UserMetadata::GROUP target) +## Limitations + +`UserMetadata` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\UserMetadata(Criterion\UserMetadata::GROUP, Criterion\Operator::EQ, 12); ``` diff --git a/docs/search/criteria_reference/visibility_criterion.md b/docs/search/criteria_reference/visibility_criterion.md index 5e5a50c76c..a908d4e2d9 100644 --- a/docs/search/criteria_reference/visibility_criterion.md +++ b/docs/search/criteria_reference/visibility_criterion.md @@ -8,19 +8,21 @@ The [`Visibility` Search Criterion](/api/php_api/php_api_reference/classes/Ibexa This Criterion takes into account both hiding content and hiding locations. -When used with Content Search, the Criterion takes into account all assigned locations. -This means that hidden content is returned if it has at least one visible location. -Use Location Search to avoid this. +When used with Content Search, the Criterion takes into account all assigned locations. This means that hidden content is returned if it has at least one visible location. Use Location Search to avoid this. ## Arguments - `value` - Visibility constant (VISIBLE, HIDDEN) +## Limitations + +`Visibility` can be used on all search engines. + ## Example ### PHP -``` php +```php $query->query = new Criterion\Visibility(Criterion\Visibility::HIDDEN); ``` @@ -41,7 +43,7 @@ $query->query = new Criterion\Visibility(Criterion\Visibility::HIDDEN); ```json "Query": { "Filter": { - "ContentIdCriterion": "HIDDEN" + "VisibilityCriterion": "HIDDEN" } } ``` diff --git a/mkdocs.yml b/mkdocs.yml index ca209a9202..0516119d23 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -530,6 +530,7 @@ nav: - ImageOrientation: search/criteria_reference/imageorientation_criterion.md - ImageWidth: search/criteria_reference/imagewidth_criterion.md - IsBookmarked: search/criteria_reference/isbookmarked_criterion.md + - IsContainer: search/criteria_reference/iscontainer_criterion.md - IsCurrencyEnabled: search/criteria_reference/iscurrencyenabled_criterion.md - IsFieldEmpty: search/criteria_reference/isfieldempty_criterion.md - IsMainLocation: search/criteria_reference/ismainlocation_criterion.md