Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
29 changes: 21 additions & 8 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 All @@ -33,9 +39,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"AncestorCriterion": "/81/82/"
{
"ViewInput": {
"identifier": "AncestorCriterionTest",
"Query": {
"Filter": {
"AncestorCriterion": "/81/82/"
}
}
}
}
```
Expand All @@ -44,9 +55,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 +72,7 @@
]);
```

``` html+twig
```html+twig
{% for breadcrumb in breadcrumbs %}
{% if not loop.first %} -> {% endif %}
{% if not loop.last %}
Expand Down
17 changes: 13 additions & 4 deletions 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 All @@ -33,9 +37,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"ContentIdCriterion": [69, 72]
{
"ViewInput": {
"identifier": "ContentIdCriterionTest",
"Query": {
"Filter": {
"ContentIdCriterion": [69, 72]
}
}
}
}
```
19 changes: 14 additions & 5 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 @@ -33,9 +37,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"ContentNameCriterion": "*phone"
{
"ViewInput": {
"identifier": "ContentNameCriterionTest",
"Query": {
"Filter": {
"ContentNameCriterion": "*phone"
}
}
}
}
```
```
28 changes: 21 additions & 7 deletions docs/search/criteria_reference/contenttypegroupid_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 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 All @@ -33,9 +37,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"ContentTypeGroupIdCriterion": [1, 2]
{
"ViewInput": {
"identifier": "ContentTypeGroupIdCriterionTest",
"Query": {
"Filter": {
"ContentTypeGroupIdCriterion": [1, 2]
}
}
}
}
```
Expand Down Expand Up @@ -71,9 +80,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"ContentIdCriterion": [69, 72]
{
"ViewInput": {
"identifier": "ContentIdCriterionTest",
"Query": {
"Filter": {
"ContentIdCriterion": [69, 72]
}
}
}
}
```
17 changes: 13 additions & 4 deletions 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 All @@ -33,9 +37,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"ContentTypeIdCriterion": 44
{
"ViewInput": {
"identifier": "ContentTypeIdCriterionTest",
"Query": {
"Filter": {
"ContentTypeIdCriterion": 44
}
}
}
}
```
17 changes: 13 additions & 4 deletions docs/search/criteria_reference/contenttypeidentifier_criterion.md
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 All @@ -33,9 +37,14 @@
=== "JSON"

```json
"Query": {
"Filter": {
"ContentTypeIdentifierCriterion": "article"
{
"ViewInput": {
"identifier": "ContentTypeIdentifierCriterionTest",
"Query": {
"Filter": {
"ContentTypeIdentifierCriterion": "article"
}
}
}
}
```
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);
```
23 changes: 16 additions & 7 deletions 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 All @@ -43,15 +47,20 @@
=== "JSON"

```json
"Query": {
"Filter": {
"DateMetadataCriterion": {
"Target": "modified",
"Value": 1675681020,
"Operator": "gte"
{
"ViewInput": {
"identifier": "DateMetadataCriterionTest",
"Query": {
"Filter": {
"DateMetadataCriterion": {
"Target": "modified",
"Value": 1675681020,
"Operator": "gte"
}
}
}
}
}
```


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);
```
18 changes: 10 additions & 8 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 All @@ -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"
}
}
}
}
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]);
```
Loading
Loading