Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/search/criteria_reference/_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---

Check warning on line 1 in docs/search/criteria_reference/_template.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/_template.md#L1

[Ibexa.ReadingLevel] The grade level is 8.18. Aim for 8th grade or lower by using shorter sentences and words.
Raw output
{"message": "[Ibexa.ReadingLevel] The grade level is 8.18. Aim for 8th grade or lower by using shorter sentences and words.", "location": {"path": "docs/search/criteria_reference/_template.md", "range": {"start": {"line": 1, "column": 1}}}, "severity": "WARNING"}
description: [Short description of the criterion]
# edition: [optional: edition, e.g. commerce]
---

# [Criterion Name] Criterion

[Short description of what this criterion does.]

## Arguments

- `[argument1]` - [description of argument1]
- `[argument2]` - [description of argument2]
- ...

Check failure on line 14 in docs/search/criteria_reference/_template.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/_template.md#L14

[Ibexa.Lists] Do not put fullstops at the end of bullets
Raw output
{"message": "[Ibexa.Lists] Do not put fullstops at the end of bullets", "location": {"path": "docs/search/criteria_reference/_template.md", "range": {"start": {"line": 14, "column": 3}}}, "severity": "ERROR"}

## Supported syntax

[Describe supported syntax, if relevant]

## Limitations

Check warning on line 20 in docs/search/criteria_reference/_template.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/_template.md#L20

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/_template.md", "range": {"start": {"line": 20, "column": 1}}}, "severity": "WARNING"}

[Describe any limitations here]

## Example

### PHP

```php
// Example PHP usage
```

### REST API

=== "XML"

```xml
<!-- Example XML usage -->
```

=== "JSON"

```json
// Example JSON usage
```

## Use case

Check warning on line 46 in docs/search/criteria_reference/_template.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/_template.md#L46

[Ibexa.HeadingContent] Rename the heading '## Use case', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Use case', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/_template.md", "range": {"start": {"line": 46, "column": 1}}}, "severity": "WARNING"}

[Describe a use case here]
18 changes: 13 additions & 5 deletions docs/search/criteria_reference/ancestor_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@

- `value` - array of location pathStrings

## Limitations

Check warning on line 13 in docs/search/criteria_reference/ancestor_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/ancestor_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/ancestor_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`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
Expand Down Expand Up @@ -44,9 +50,11 @@

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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add to add hl_lines back and update it.

$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 = [];
Expand All @@ -59,7 +67,7 @@
]);
```

``` html+twig
```html+twig
{% for breadcrumb in breadcrumbs %}
{% if not loop.first %} -> {% endif %}
{% if not loop.last %}
Expand Down
6 changes: 5 additions & 1 deletion docs/search/criteria_reference/contentid_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@

- `value` - int(s) representing the Content ID(s)

## Limitations

Check warning on line 13 in docs/search/criteria_reference/contentid_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/contentid_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/contentid_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`ContentId` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\ContentId([62, 64]);
```

Expand Down
8 changes: 6 additions & 2 deletions docs/search/criteria_reference/contentname_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@

- `value` - string representing the content name, the wildcard character `*` can be used for partial search

## Limitations

Check warning on line 13 in docs/search/criteria_reference/contentname_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/contentname_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/contentname_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`ContentName` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\ContentName('*phone');
```

Expand All @@ -38,4 +42,4 @@
"ContentNameCriterion": "*phone"
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@

- `value` - int(s) representing the content type group ID(s)

## Limitations

Check warning on line 13 in docs/search/criteria_reference/contenttypegroupid_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/contenttypegroupid_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/contenttypegroupid_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`ContentTypeGroupId` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\ContentTypeGroupId([1, 2]);
```

Expand Down
6 changes: 5 additions & 1 deletion docs/search/criteria_reference/contenttypeid_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@

- `value` - int(s) representing the content type ID(s)

## Limitations

Check warning on line 13 in docs/search/criteria_reference/contenttypeid_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/contenttypeid_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/contenttypeid_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`ContentTypeId` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\ContentTypeId([44]);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@

- `value` - string(s) representing the content type identifier(s)

## Limitations

Check warning on line 13 in docs/search/criteria_reference/contenttypeidentifier_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/contenttypeidentifier_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/contenttypeidentifier_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`ContentTypeIdentifier` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\ContentTypeIdentifier(['article', 'blog_post']);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/search/criteria_reference/currencycode_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
```
6 changes: 5 additions & 1 deletion docs/search/criteria_reference/customergroupid_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@

- `value` - int(s) representing the customer group ID(s)

## Limitations

Check warning on line 13 in docs/search/criteria_reference/customergroupid_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/customergroupid_criterion.md#L13

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/customergroupid_criterion.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

`CustomerGroupId` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\CustomerGroupId(1);
```
6 changes: 5 additions & 1 deletion docs/search/criteria_reference/datemetadata_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
- `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

Check warning on line 15 in docs/search/criteria_reference/datemetadata_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/datemetadata_criterion.md#L15

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/datemetadata_criterion.md", "range": {"start": {"line": 15, "column": 1}}}, "severity": "WARNING"}

`DateMetadata` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\DateMetadata(
Criterion\DateMetadata::CREATED,
Criterion\Operator::BETWEEN,
Expand Down
6 changes: 5 additions & 1 deletion docs/search/criteria_reference/depth_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
- exactly two ints for `Operator::BETWEEN`
- a single int for other Operators

## Limitations

Check warning on line 22 in docs/search/criteria_reference/depth_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/depth_criterion.md#L22

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/depth_criterion.md", "range": {"start": {"line": 22, "column": 1}}}, "severity": "WARNING"}

`Depth` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\Location\Depth(Criterion\Operator::LT, 3);
```
3 changes: 1 addition & 2 deletions docs/search/criteria_reference/field_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
```

Expand Down
2 changes: 1 addition & 1 deletion docs/search/criteria_reference/fieldrelation_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
```
7 changes: 3 additions & 4 deletions docs/search/criteria_reference/fulltext_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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');
```

Expand Down
8 changes: 6 additions & 2 deletions docs/search/criteria_reference/image_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
- `fieldDefIdentifier` - string representing the identifier of the field
- `imageCriteriaData` - array representing image attributes. All attributes are optional.

## Limitations

Check warning on line 14 in docs/search/criteria_reference/image_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/image_criterion.md#L14

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/image_criterion.md", "range": {"start": {"line": 14, "column": 1}}}, "severity": "WARNING"}

`Image` can be used on all search engines.

## Example

### PHP

``` php
```php
$imageCriteriaData = [
'mimeTypes' => [
'image/png',
Expand Down Expand Up @@ -118,4 +122,4 @@
}
}
}
```
```
8 changes: 6 additions & 2 deletions docs/search/criteria_reference/imagedimensions_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
- `fieldDefIdentifier` - string representing the identifier of the field
- `imageCriteriaData` - an array representing minimum and maximum values for width and height, expressed in pixels

## Limitations

Check warning on line 14 in docs/search/criteria_reference/imagedimensions_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/imagedimensions_criterion.md#L14

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/imagedimensions_criterion.md", "range": {"start": {"line": 14, "column": 1}}}, "severity": "WARNING"}

`ImageDimensions` can be used on all search engines.

## Example

### PHP

``` php
```php
$imageCriteriaData = [
'width' => [
'min' => 100, // (default: 0, optional)
Expand Down Expand Up @@ -70,4 +74,4 @@
}
}
}
```
```
8 changes: 6 additions & 2 deletions docs/search/criteria_reference/imagefilesize_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
- (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

Check warning on line 15 in docs/search/criteria_reference/imagefilesize_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/imagefilesize_criterion.md#L15

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/imagefilesize_criterion.md", "range": {"start": {"line": 15, "column": 1}}}, "severity": "WARNING"}

`ImageFileSize` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\FileSize('image', 0, 1.5);
```

Expand Down Expand Up @@ -52,4 +56,4 @@
}
}
}
```
```
6 changes: 5 additions & 1 deletion docs/search/criteria_reference/imageheight_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
- (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

Check warning on line 15 in docs/search/criteria_reference/imageheight_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/imageheight_criterion.md#L15

[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.
Raw output
{"message": "[Ibexa.HeadingContent] Rename the heading '## Limitations', or re-purpose the content elsewhere.", "location": {"path": "docs/search/criteria_reference/imageheight_criterion.md", "range": {"start": {"line": 15, "column": 1}}}, "severity": "WARNING"}

`ImageHeight` can be used on all search engines.

## Example

### PHP

``` php
```php
$query->query = new Criterion\Height('image', 0, 1500);
```
Loading
Loading