Skip to content
Merged
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
24 changes: 24 additions & 0 deletions docs/search/criteria_reference/ancestor_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,34 @@ searches for content that is an ancestor of the provided Location, including thi

## Example

### PHP

``` php
$query->query = new Criterion\Ancestor([$this->locationService->loadLocation(62)->pathString]);
```

### REST API

=== "XML"

```xml
<Query>
<Filter>
<AncestorCriterion>/81/82/</AncestorCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"AncestorCriterion": "/81/82/"
}
}
```

## Use case

You can use the Ancestor Search Criterion to create a list of breadcrumbs leading to the Location:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AttributeGroupIdentifier Criterion

The `AttributeGroupIdentifier` Search Criterion searches for products by the value of their attribute group identifier.

## Arguments

- `value` - string representing the attribute's identifier

## Example

### REST API

=== "XML"

```xml
<AttributeQuery>
<Query>
<AttributeGroupIdentifier>attribute_group</AttributeGroupIdentifier>
</Query>
</AttributeQuery>
```

=== "JSON"

```json
{
"AttributeQuery": {
"Query": {
"AttributeGroupIdentifier": "attribute_group"
}
}
}
```
33 changes: 33 additions & 0 deletions docs/search/criteria_reference/attributename_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AttributeName Criterion

The `AttributeName` Search Criterion searches for products by the value of their attribute name.

## Arguments

- `value` - string representing the attribute's name

## Example

### REST API

=== "XML"

```xml
<AttributeQuery>
<Query>
<AttributeNameCriterion>measure</AttributeNameCriterion>
</Query>
</AttributeQuery>
```

=== "JSON"

```json
{
"AttributeQuery": {
"Query": {
"AttributeNameCriterion": "measure"
}
}
}
```
2 changes: 2 additions & 0 deletions docs/search/criteria_reference/baseprice_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The `BasePrice` Criterion is not available in the Legacy Search engine.

## Example

### PHP

``` php
$query = new ProductQuery(
null,
Expand Down
33 changes: 33 additions & 0 deletions docs/search/criteria_reference/catalogidentifier_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CatalogIdentifier Criterion

The `CatalogIdentifier` Search Criterion searches for a catalog by the value of its identifier.

## Arguments

- `value` - string representing the catalog's identifier

## Example

### REST API

=== "XML"

```xml
<CatalogQuery>
<Query>
<CatalogIdentifierCriterion>catalog_1</CatalogIdentifierCriterion>
</Query>
</CatalogQuery>
```

=== "JSON"

```json
{
"CatalogQuery": {
"Query": {
"CatalogIdentifierCriterion": "catalog_1",
}
}
}
```
33 changes: 33 additions & 0 deletions docs/search/criteria_reference/catalogname_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CatalogName Criterion

The `CatalogName` Search Criterion searches for catalogs by the value of their name.

## Arguments

- `value` - string representing the catalog's name

## Example

### REST API

=== "XML"

```xml
<CatalogQuery>
<Query>
<CatalogNameCriterion>Furniture</CatalogNameCriterion>
</Query>
</CatalogQuery>
```

=== "JSON"

```json
{
"CatalogQuery": {
"Query": {
"CatalogNameCriterion": "Furniture"
}
}
}
```
33 changes: 33 additions & 0 deletions docs/search/criteria_reference/catalogstatus_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CatalogStatus Criterion

The `CatalogStatus` Search Criterion searches for catalogs by the value of their status.

## Arguments

- `value` - string representing the catalog's status

## Example

### REST API

=== "XML"

```xml
<CatalogQuery>
<Query>
<CatalogStatusCriterion>published</CatalogStatusCriterion>
</Query>
</CatalogQuery>
```

=== "JSON"

```json
{
"CatalogQuery": {
"Query": {
"CatalogStatusCriterion": "published"
}
}
}
```
2 changes: 2 additions & 0 deletions docs/search/criteria_reference/checkboxattribute_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The `CheckboxAttribute` Search Criterion searches for products by the value of t

## Example

### PHP

``` php
$query = new ProductQuery(
null,
Expand Down
32 changes: 32 additions & 0 deletions docs/search/criteria_reference/colorattribute_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,41 @@ The `ColorAttribute` Search Criterion searches for products by the value of thei

## Example

### PHP

``` php
$query = new ProductQuery(
null,
new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ColorAttribute('color', ['#FF0000'])
);
```

### REST API

=== "XML"

```xml
<AttributeQuery>
<Query>
<ColorAttributeCriterion>
<identifier>color</identifier>
<value>#000000</value>
</ColorAttributeCriterion>
</Query>
</AttributeQuery>
```

=== "JSON"

```json
{
"AttributeQuery": {
"Query": {
"ColorAttributeCriterion": {
"identifier": "color",
"value": ["#000000"]
},
}
}
}
```
24 changes: 24 additions & 0 deletions docs/search/criteria_reference/contentid_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@ searches for content by its ID.

## Example

### PHP

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

### REST API

=== "XML"

```xml
<Query>
<Filter>
<ContentIdCriterion>[69, 72]</ContentIdCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"ContentIdCriterion": [69, 72]
}
}
```
46 changes: 46 additions & 0 deletions docs/search/criteria_reference/contenttypegroupid_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,34 @@ searches for content based on the ID of its Content Type group.

## Example

### PHP

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

### REST API

=== "XML"

```xml
<Query>
<Filter>
<ContentTypeGroupIdCriterion>[1, 2]</ContentTypeGroupIdCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"ContentTypeGroupIdCriterion": [1, 2]
}
}
```

## Use case

You can use the `ContentTypeGroupId` Criterion to query all Media Content items
Expand All @@ -28,3 +52,25 @@ You can use the `ContentTypeGroupId` Criterion to query all Media Content items
}
}
```

### REST API

=== "XML"

```xml
<Query>
<Filter>
<ContentIdCriterion>[69, 72]</ContentIdCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"ContentIdCriterion": [69, 72]
}
}
```
24 changes: 24 additions & 0 deletions docs/search/criteria_reference/contenttypeid_criterion.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@ searches for content based on the ID of its Content Type.

## Example

### PHP

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

### REST API

=== "XML"

```xml
<Query>
<Filter>
<ContentTypeIdCriterion>44</ContentTypeIdCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"ContentTypeIdCriterion": 44
}
}
```
Loading