diff --git a/docs/search/aggregation_reference/aggregation_reference.md b/docs/search/aggregation_reference/aggregation_reference.md
index 62b08c1902..83adc099ef 100644
--- a/docs/search/aggregation_reference/aggregation_reference.md
+++ b/docs/search/aggregation_reference/aggregation_reference.md
@@ -58,6 +58,7 @@ There are three types of aggregations:
|---|---|---|
|[Product attribute](product_attribute_aggregations.md) | Term / Range | Product attribute values |
|[ProductAvailabilityTerm](productavailabilityterm_aggregation.md) | Term | Product availability |
+|[ProductStockRange](productstockrange_aggregation.md) | Range | Product stock |
|[ProductPriceRange](productpricerange_aggregation.md) | Range | Product price |
|[ProductTypeTerm](producttypeterm_aggregation.md) | Term | Product type |
|[TaxonomyEntryIdAggregation](taxonomyentryid_aggregation.md) | Term | Product category |
diff --git a/docs/search/aggregation_reference/productstockrange_aggregation.md b/docs/search/aggregation_reference/productstockrange_aggregation.md
new file mode 100644
index 0000000000..a67297f614
--- /dev/null
+++ b/docs/search/aggregation_reference/productstockrange_aggregation.md
@@ -0,0 +1,21 @@
+# ProductStockRangeAggregation
+
+The ProductStockRangeAggregation aggregates search results by products' numerical stock.
+
+## Arguments
+
+- `name` - name of the Aggregation
+- `ranges` - array of Range objects that define the borders of the specific range sets
+
+## Example
+
+``` php
+$productQuery = new ProductQuery();
+$productQuery->setAggregations([
+ new ProductStockRangeAggregation('stock', [
+ new Range(null, 10),
+ new Range(10, 100),
+ new Range(100, null),
+ ]),
+]);
+```
diff --git a/docs/search/criteria_reference/ancestor_criterion.md b/docs/search/criteria_reference/ancestor_criterion.md
index edc196fa4e..0f0f0c40a0 100644
--- a/docs/search/criteria_reference/ancestor_criterion.md
+++ b/docs/search/criteria_reference/ancestor_criterion.md
@@ -9,10 +9,22 @@ 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
+```
+
+JSON
+
+
## Use case
You can use the Ancestor Search Criterion to create a list of breadcrumbs leading to the Location:
diff --git a/docs/search/criteria_reference/baseprice_criterion.md b/docs/search/criteria_reference/baseprice_criterion.md
index c7b32a3163..04aa3fc218 100644
--- a/docs/search/criteria_reference/baseprice_criterion.md
+++ b/docs/search/criteria_reference/baseprice_criterion.md
@@ -4,7 +4,7 @@ The [`BasePrice` Search Criterion](https://github.com/ibexa/core/blob/main/src/c
## Arguments
-- `value` - a `Money` object representing the price in a specific currency
+- `value` - a `Money\Money` object representing the price in a specific currency
- (optional) `operator` - Operator constant (EQ, GT, GTE, LT, LTE, default EQ)
## Limitations
@@ -13,6 +13,39 @@ The `BasePrice` Criterion is not available in the Legacy Search engine.
## Example
+### PHP
+
``` php
-$query->query = new Product\Query\Criterion\BasePrice(Money::EUR(12900), BasePrice::GTE);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\BasePrice(
+ \Money\Money::EUR(12900),
+ \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE
+ )
+);
```
+
+### REST
+
+=== "XML"
+
+ ```xml
+
+
+
+ EUR(12900)
+ gte
+
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "ContentIdCriterion": [69, 72]
+ }
+ }
+ ```
diff --git a/docs/search/criteria_reference/checkboxattribute_criterion.md b/docs/search/criteria_reference/checkboxattribute_criterion.md
index 75af3f1bf8..da375d8774 100644
--- a/docs/search/criteria_reference/checkboxattribute_criterion.md
+++ b/docs/search/criteria_reference/checkboxattribute_criterion.md
@@ -10,5 +10,8 @@ The `CheckboxAttribute` Search Criterion searches for products by the value of t
## Example
``` php
-$query->query = new Product\Query\Criterion\CheckboxAttribute('automatic', true);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CheckboxAttribute('automatic', true)
+);
```
diff --git a/docs/search/criteria_reference/colorattribute_criterion.md b/docs/search/criteria_reference/colorattribute_criterion.md
index f8b529e73e..33e000f7c9 100644
--- a/docs/search/criteria_reference/colorattribute_criterion.md
+++ b/docs/search/criteria_reference/colorattribute_criterion.md
@@ -5,10 +5,13 @@ The `ColorAttribute` Search Criterion searches for products by the value of thei
## Arguments
- `identifier` - string representing the attribute
-- `value` - string representing the attribute value
+- `value` - array of strings representing the attribute values
## Example
``` php
-$query->query = new Product\Query\Criterion\ColorAttribute('color', '#FF0000');
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ColorAttribute('color', ['#FF0000'])
+);
```
diff --git a/docs/search/criteria_reference/contentid_criterion.md b/docs/search/criteria_reference/contentid_criterion.md
index b7c73850a2..458dee8aeb 100644
--- a/docs/search/criteria_reference/contentid_criterion.md
+++ b/docs/search/criteria_reference/contentid_criterion.md
@@ -9,6 +9,30 @@ searches for content by its ID.
## Example
+### PHP
+
``` php
$query->query = new Criterion\ContentId([62, 64]);
```
+
+### REST
+
+=== "XML"
+
+ ```xml
+
+
+ [69, 72]
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "ContentIdCriterion": [69, 72]
+ }
+ }
+ ```
\ No newline at end of file
diff --git a/docs/search/criteria_reference/contenttypeid_criterion.md b/docs/search/criteria_reference/contenttypeid_criterion.md
index fc882745b5..6b393fb7c8 100644
--- a/docs/search/criteria_reference/contenttypeid_criterion.md
+++ b/docs/search/criteria_reference/contenttypeid_criterion.md
@@ -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
+
+=== "XML"
+
+ ```xml
+
+
+ 44
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "ContentTypeIdCriterion": 44
+ }
+ }
+ ```
\ No newline at end of file
diff --git a/docs/search/criteria_reference/contenttypeidentifier_criterion.md b/docs/search/criteria_reference/contenttypeidentifier_criterion.md
index 35a4c4a47f..d7f7370a57 100644
--- a/docs/search/criteria_reference/contenttypeidentifier_criterion.md
+++ b/docs/search/criteria_reference/contenttypeidentifier_criterion.md
@@ -9,6 +9,30 @@ searches for content based on the identifier of its Content Type.
## Example
+### PHP
+
``` php
$query->query = new Criterion\ContentTypeIdentifier(['article', 'blog_post']);
```
+
+### REST API
+
+=== "XML"
+
+ ```xml
+
+
+ article
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "ContentTypeIdentifierCriterion": "article"
+ }
+ }
+ ```
\ No newline at end of file
diff --git a/docs/search/criteria_reference/createdat_criterion.md b/docs/search/criteria_reference/createdat_criterion.md
index c406a82376..ff9098a3ae 100644
--- a/docs/search/criteria_reference/createdat_criterion.md
+++ b/docs/search/criteria_reference/createdat_criterion.md
@@ -9,11 +9,38 @@ The `CreatedAt` Search Criterion searches for products based on the date when th
## Example
+### PHP
+
``` php
-$criteria = new Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAt(
- '2022-07-11T00:00:00+02:00'
- Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE,
+$criteria = new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAt(
+ new DateTime('2023-03-01'),
+ \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE,
);
$productQuery = new ProductQuery(null, $criteria);
```
+
+### REST
+
+=== "XML"
+
+ ```xml
+
+
+
+ 12-09-2022
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "CreatedAtCriterion": {
+ "created_at": "12-09-2022"
+ }
+ }
+ }
+ ```
\ No newline at end of file
diff --git a/docs/search/criteria_reference/createdatrange_criterion.md b/docs/search/criteria_reference/createdatrange_criterion.md
index 2742991464..2e47444b2e 100644
--- a/docs/search/criteria_reference/createdatrange_criterion.md
+++ b/docs/search/criteria_reference/createdatrange_criterion.md
@@ -10,7 +10,7 @@ The `CreatedAtRange` Search Criterion searches for products based on the date ra
## Example
``` php
-$criteria = new Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAtRange(
+$criteria = new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CreatedAtRange(
new \DateTimeImmutable('2020-07-10T00:00:00+00:00'),
new \DateTimeImmutable('2023-07-12T00:00:00+00:00')
);
diff --git a/docs/search/criteria_reference/customprice_criterion.md b/docs/search/criteria_reference/customprice_criterion.md
index c52e443606..82562f1b5c 100644
--- a/docs/search/criteria_reference/customprice_criterion.md
+++ b/docs/search/criteria_reference/customprice_criterion.md
@@ -4,7 +4,7 @@ The `CustomPrice` Search Criterion searches for products by their custom price f
## Arguments
-- `value` - a `Money` object representing the price in a specific currency
+- `value` - a `Money\Money` object representing the price in a specific currency
- (optional) `operator` - Operator constant (EQ, GT, GTE, LT, LTE, default EQ)
- (optional) `customerGroup` - a `CustomerGroupInterface` object representing the customer group to show prices for.
If you do not provide a customer group, the query uses the group related to the current user.
@@ -16,5 +16,11 @@ The `CustomPrice` Criterion is not available in the Legacy Search engine.
## Example
``` php
-$query->query = new Product\Query\Criterion\CustomPrice(Money::EUR(13800), BasePrice::GTE, $customerGroup);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\CustomPrice(
+ \Money\Money::EUR(13800),
+ \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\Operator::GTE,
+ $customerGroup)
+);
```
diff --git a/docs/search/criteria_reference/datemetadata_criterion.md b/docs/search/criteria_reference/datemetadata_criterion.md
index e1b7aa53d6..1c7b556ebe 100644
--- a/docs/search/criteria_reference/datemetadata_criterion.md
+++ b/docs/search/criteria_reference/datemetadata_criterion.md
@@ -9,7 +9,9 @@ searches for content based on the date when it was created or last modified.
- `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)
-## Example
+## Examples
+
+### PHP API
``` php
$query->query = new Criterion\DateMetadata(
@@ -19,6 +21,36 @@ $query->query = new Criterion\DateMetadata(
);
```
+### REST API
+
+=== "XML"
+
+ ```xml
+
+
+
+ modified
+ 1675681020
+ gte
+
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "DateMetadataCriterion": {
+ "Target": "modified",
+ "Value": 1675681020,
+ "Operator": "gte"
+ }
+ }
+ }
+ ```
+
## Use case
You can use the `DateMetadata` Criterion to search for blog posts that have been created within the last week:
@@ -31,4 +63,4 @@ $query->query = new Criterion\LogicalAnd([
new Criterion\DateMetadata(Criterion\DateMetadata::CREATED, Criterion\Operator::GTE, $date),
]
);
-```
+```
\ No newline at end of file
diff --git a/docs/search/criteria_reference/floatattribute_criterion.md b/docs/search/criteria_reference/floatattribute_criterion.md
index e87d016114..48a270f2ae 100644
--- a/docs/search/criteria_reference/floatattribute_criterion.md
+++ b/docs/search/criteria_reference/floatattribute_criterion.md
@@ -10,5 +10,11 @@ The `FloatAttribute` Search Criterion searches for products by the value of thei
## Example
``` php
-$query->query = new Product\Query\Criterion\FloatAttribute('length', 16.5);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\FloatAttribute(
+ 'length',
+ 16.5
+ )
+);
```
diff --git a/docs/search/criteria_reference/integerattribute_criterion.md b/docs/search/criteria_reference/integerattribute_criterion.md
index 994cf5871d..8e33910892 100644
--- a/docs/search/criteria_reference/integerattribute_criterion.md
+++ b/docs/search/criteria_reference/integerattribute_criterion.md
@@ -10,5 +10,11 @@ The `IntegerAttribute` Search Criterion searches for products by the value of th
## Example
``` php
-$query->query = new Product\Query\Criterion\IntegerAttribute('size', 38);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\IntegerAttribute(
+ 'size',
+ 38
+ )
+);
```
diff --git a/docs/search/criteria_reference/product_search_criteria.md b/docs/search/criteria_reference/product_search_criteria.md
index 7b919199a4..c1c6ebd86a 100644
--- a/docs/search/criteria_reference/product_search_criteria.md
+++ b/docs/search/criteria_reference/product_search_criteria.md
@@ -20,6 +20,8 @@ Search Criterion let you to filter product by specific attributes, for example:
|[IntegerAttribute](integerattribute_criterion.md)|Value of product's integer attribute|
|[SelectionAttribute](selectionattribute_criterion.md)|Value of product's selection attribute|
|[ProductAvailability](productavailability_criterion.md)|Product's availability|
+|[ProductStock](productstock_criterion.md)|Product's numerical stock|
+|[ProductStockRange](productstockrange_criterion.md)|Product's numerical stock|
|[ProductCategory](productcategory_criterion.md)|Product category assigned to product|
|[ProductCode](productcode_criterion.md)|Product's code|
|[ProductName](productname_criterion.md)|Product's name|
diff --git a/docs/search/criteria_reference/productavailability_criterion.md b/docs/search/criteria_reference/productavailability_criterion.md
index a02761b3a5..01cf312792 100644
--- a/docs/search/criteria_reference/productavailability_criterion.md
+++ b/docs/search/criteria_reference/productavailability_criterion.md
@@ -9,5 +9,8 @@ The `ProductAvailability` Search Criterion searches for products by their availa
## Example
``` php
-$query->query = new Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductAvailability(true);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductAvailability(true)
+);
```
diff --git a/docs/search/criteria_reference/productcategory_criterion.md b/docs/search/criteria_reference/productcategory_criterion.md
index 1bfe06e97a..f98e0dc0dc 100644
--- a/docs/search/criteria_reference/productcategory_criterion.md
+++ b/docs/search/criteria_reference/productcategory_criterion.md
@@ -9,7 +9,8 @@ The `ProductCategory` Search Criterion searches for products by the category the
## Example
``` php
-$criteria = new Criterion\ProductCategory([2, 3]);
-
-$productQuery = new ProductQuery(null, $criteria);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCategory([2, 3])
+);
```
diff --git a/docs/search/criteria_reference/productcode_criterion.md b/docs/search/criteria_reference/productcode_criterion.md
index 5eb16a1067..bd367603dc 100644
--- a/docs/search/criteria_reference/productcode_criterion.md
+++ b/docs/search/criteria_reference/productcode_criterion.md
@@ -4,10 +4,13 @@ The `ProductCode` Search Criterion searches for products by their codes.
## Arguments
-- `productCode` - int(s) representing the Product codes(s)
+- `productCode` - array of strings representing the Product codes(s)
## Example
``` php
-$query->query = new Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCode([62, 64]);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCode(['ergo_desk', 'alter_desk'])
+);
```
diff --git a/docs/search/criteria_reference/productname_criterion.md b/docs/search/criteria_reference/productname_criterion.md
index e96960fb4e..d0b319e7d7 100644
--- a/docs/search/criteria_reference/productname_criterion.md
+++ b/docs/search/criteria_reference/productname_criterion.md
@@ -9,5 +9,8 @@ The `ProductName` Search Criterion searches for products by theis names.
## Example
``` php
-$query->query = new Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductName('sofa*');
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductName('sofa*')
+);
```
diff --git a/docs/search/criteria_reference/productstock_criterion.md b/docs/search/criteria_reference/productstock_criterion.md
new file mode 100644
index 0000000000..c4b3911422
--- /dev/null
+++ b/docs/search/criteria_reference/productstock_criterion.md
@@ -0,0 +1,26 @@
+# ProductStock Criterion
+
+The `ProductStock` Search Criterion searches for products by their numerical stock.
+
+## Arguments
+
+- `value` - the numerical stock to search for
+- (optional) `operator` - operator string (`=` `<` `<=` `>` `>=`)
+
+## Example
+
+``` php
+$productQuery = new ProductQuery(
+ null,
+ new Criterion\ProductStock(10)
+);
+```
+
+``` php
+$productQuery = new ProductQuery(
+ null,
+ new Criterion\ProductStock(50, '>=')
+);
+```
+
+
diff --git a/docs/search/criteria_reference/productstockrange_criterion.md b/docs/search/criteria_reference/productstockrange_criterion.md
new file mode 100644
index 0000000000..92608d1549
--- /dev/null
+++ b/docs/search/criteria_reference/productstockrange_criterion.md
@@ -0,0 +1,19 @@
+# ProductStockRange Criterion
+
+The `ProductStockRange` Search Criterion searches for products by their numerical stock.
+
+## Arguments
+
+- `min` - minimum stock
+- `max` - maximum stock
+
+## Example
+
+``` php
+$productQuery = new ProductQuery(
+ null,
+ new Criterion\ProductStockRange(10, 120)
+);
+```
+
+
diff --git a/docs/search/criteria_reference/producttype_criterion.md b/docs/search/criteria_reference/producttype_criterion.md
index 9ad28e8d56..97e92f2b16 100644
--- a/docs/search/criteria_reference/producttype_criterion.md
+++ b/docs/search/criteria_reference/producttype_criterion.md
@@ -4,10 +4,13 @@ The `ProductType` Search Criterion searches for products by their codes.
## Arguments
-- `productType` - string(s) representing the Product type(s)
+- `productType` - array of strings representing the Product type(s)
## Example
``` php
-$query->query = new Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductType(['dress']);
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductType(['dress'])
+);
```
diff --git a/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md b/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md
index 7da96473d2..b981740d47 100644
--- a/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md
+++ b/docs/search/criteria_reference/rangemeasurementattributemaximum_criterion.md
@@ -11,5 +11,12 @@ The `RangeMeasurementAttributeMaximum` Search Criterion searches for products by
``` php
$value = $this->measurementService->buildSimpleValue('length', 150, 'centimeter');
-$criteria = new Criterion\RangeMeasurementAttributeMaximum('length', $value);
+
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\RangeMeasurementAttributeMaximum(
+ 'length',
+ $value
+ )
+);
```
diff --git a/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md b/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md
index 4ca6befc08..2b8444b3d8 100644
--- a/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md
+++ b/docs/search/criteria_reference/rangemeasurementattributeminimum_criterion.md
@@ -11,5 +11,12 @@ The `RangeMeasurementAttributeMinimum` Search Criterion searches for products by
``` php
$value = $this->measurementService->buildSimpleValue('length', 100, 'centimeter');
-$criteria = new Criterion\RangeMeasurementAttributeMinimum('length', $value);
+
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\RangeMeasurementAttributeMinimum(
+ 'length',
+ $value
+ )
+);
```
diff --git a/docs/search/criteria_reference/sectionidentifier_criterion.md b/docs/search/criteria_reference/sectionidentifier_criterion.md
index c244ca6509..82ca6d60ce 100644
--- a/docs/search/criteria_reference/sectionidentifier_criterion.md
+++ b/docs/search/criteria_reference/sectionidentifier_criterion.md
@@ -9,6 +9,32 @@ searches for content based on the identifier of the Section it is assigned to.
## Example
+### PHP
+
``` php
$query->query = new Criterion\SectionIdentifier(['sports', 'news']);
```
+
+### REST API
+
+### REST
+
+=== "XML"
+
+ ```xml
+
+
+ sports
+
+
+ ```
+
+=== "JSON"
+
+ ```json
+ "Query": {
+ "Filter": {
+ "SectionIdentifierCriterion": "sports"
+ }
+ }
+ ```
\ No newline at end of file
diff --git a/docs/search/criteria_reference/selectionattribute_criterion.md b/docs/search/criteria_reference/selectionattribute_criterion.md
index 0240e6d968..07ce8eee7b 100644
--- a/docs/search/criteria_reference/selectionattribute_criterion.md
+++ b/docs/search/criteria_reference/selectionattribute_criterion.md
@@ -5,10 +5,16 @@ The `SelectionAttribute` Search Criterion searches for products by the value of
## Arguments
- `identifier` - string representing the attribute
-- `value` - string representing the attribute value
+- `value` - array of strings representing the attribute values
## Example
``` php
-$query->query = new Product\Query\Criterion\SelectionAttribute('fabric_type', 'cotton');
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\SelectionAttribute(
+ 'fabric_type',
+ ['cotton']
+ )
+);
```
diff --git a/docs/search/criteria_reference/simplemeasurementattribute_criterion.md b/docs/search/criteria_reference/simplemeasurementattribute_criterion.md
index 4cbb35653b..a948daed98 100644
--- a/docs/search/criteria_reference/simplemeasurementattribute_criterion.md
+++ b/docs/search/criteria_reference/simplemeasurementattribute_criterion.md
@@ -11,5 +11,12 @@ The `SimpleMeasurementAttribute` Search Criterion searches for products by the v
``` php
$value = $this->measurementService->buildSimpleValue('length', 120, 'centimeter');
-$criteria = new Criterion\SimpleMeasurementAttribute('width', $value);
+
+$query = new ProductQuery(
+ null,
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\SimpleMeasurementAttribute(
+ 'width',
+ $value
+ )
+);
```
diff --git a/docs/search/sort_clause_reference/baseprice_sort_clause.md b/docs/search/sort_clause_reference/baseprice_sort_clause.md
index d6bf4080d7..51266b0190 100644
--- a/docs/search/sort_clause_reference/baseprice_sort_clause.md
+++ b/docs/search/sort_clause_reference/baseprice_sort_clause.md
@@ -14,6 +14,11 @@ The `BasePrice` Sort Clause is not available in the Legacy Search engine.
## Example
``` php
-$sortClauses = [new SortClause\BasePrice($currency, ProductQuery::SORT_ASC)];
+$sortClauses = [
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\BasePrice(
+ $currency,
+ ProductQuery::SORT_ASC
+ )
+];
$productQuery = new ProductQuery(null, null, $sortClauses);
```
diff --git a/docs/search/sort_clause_reference/createdat_sort_clause.md b/docs/search/sort_clause_reference/createdat_sort_clause.md
index e1509d23ad..bd8cbeb3b8 100644
--- a/docs/search/sort_clause_reference/createdat_sort_clause.md
+++ b/docs/search/sort_clause_reference/createdat_sort_clause.md
@@ -11,9 +11,10 @@ The `CreatedAt` Sort Clause sorts search results by the date and time of the cre
``` php
$productQuery = new ProductQuery(
null,
- $criteria,
+ null,
[
- new CreatedAt(CreatedAt::SORT_ASC)
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CreatedAt(
+ \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CreatedAt::SORT_ASC)
]
);
```
diff --git a/docs/search/sort_clause_reference/customprice_sort_clause.md b/docs/search/sort_clause_reference/customprice_sort_clause.md
index e4e2a0d0a0..06c4c1ae6a 100644
--- a/docs/search/sort_clause_reference/customprice_sort_clause.md
+++ b/docs/search/sort_clause_reference/customprice_sort_clause.md
@@ -16,6 +16,11 @@ The `CustomPrice` Sort Clause is not available in the Legacy Search engine.
## Example
``` php
-$sortClauses = [new SortClause\CustomPrice($currency, ProductQuery::SORT_ASC, $customerGroup)];
+$sortClauses = [
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\CustomPrice(
+ $currency,
+ ProductQuery::SORT_ASC, $customerGroup
+ )
+];
$productQuery = new ProductQuery(null, null, $sortClauses);
```
diff --git a/docs/search/sort_clause_reference/productavailability_sort_clause.md b/docs/search/sort_clause_reference/productavailability_sort_clause.md
index eac6c0046c..6b996de968 100644
--- a/docs/search/sort_clause_reference/productavailability_sort_clause.md
+++ b/docs/search/sort_clause_reference/productavailability_sort_clause.md
@@ -9,6 +9,11 @@ The `ProductAvailability` Sort Clause sorts search results by whether they have
## Example
``` php
-$query = new Query();
-$query->sortClauses = [new Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductAvailability()];
+$query = new ProductQuery(
+ null,
+ null,
+ [
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductAvailability()
+ ]
+);
```
diff --git a/docs/search/sort_clause_reference/productcode_sort_clause.md b/docs/search/sort_clause_reference/productcode_sort_clause.md
index 4e1b0f0af0..5a8927a71b 100644
--- a/docs/search/sort_clause_reference/productcode_sort_clause.md
+++ b/docs/search/sort_clause_reference/productcode_sort_clause.md
@@ -9,6 +9,11 @@ The `ProductCode` Sort Clause sorts search results by the Product code.
## Example
``` php
-$query = new LocationQuery();
-$query->sortClauses = [new Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductCode()];
+$query = new ProductQuery(
+ null,
+ null,
+ [
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductCode()
+ ]
+);
```
diff --git a/docs/search/sort_clause_reference/productname_sort_clause.md b/docs/search/sort_clause_reference/productname_sort_clause.md
index e8ddc3c497..bf3000f774 100644
--- a/docs/search/sort_clause_reference/productname_sort_clause.md
+++ b/docs/search/sort_clause_reference/productname_sort_clause.md
@@ -9,6 +9,11 @@ The `ProductName` Sort Clause sorts search results by the Product code.
## Example
``` php
-$query = new LocationQuery();
-$query->sortClauses = [new Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductName()];
+$query = new ProductQuery(
+ null,
+ null,
+ [
+ new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\SortClause\ProductName()
+ ]
+);
```
diff --git a/mkdocs.yml b/mkdocs.yml
index 37e60c2353..623a9a866a 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -458,6 +458,8 @@ nav:
- FloatAttribute: search/criteria_reference/floatattribute_criterion.md
- IntegerAttribute: search/criteria_reference/integerattribute_criterion.md
- ProductAvailability: search/criteria_reference/productavailability_criterion.md
+ - ProductStock: search/criteria_reference/productstock_criterion.md
+ - ProductStockRange: search/criteria_reference/productstockrange_criterion.md
- ProductCategory: search/criteria_reference/productcategory_criterion.md
- ProductCode: search/criteria_reference/productcode_criterion.md
- ProductName: search/criteria_reference/productname_criterion.md
@@ -595,6 +597,7 @@ nav:
- KeywordTermAggregation: search/aggregation_reference/keywordterm_aggregation.md
- Product attribute aggregations: search/aggregation_reference/product_attribute_aggregations.md
- ProductAvailabilityTermAggregation: search/aggregation_reference/productavailabilityterm_aggregation.md
+ - ProductStockRangeAggregation: search/aggregation_reference/productstockrange_aggregation.md
- ProductPriceRangeAggregation: search/aggregation_reference/productpricerange_aggregation.md
- ProductTypeTermAggregation: search/aggregation_reference/producttypeterm_aggregation.md
- SelectionTermAggregation: search/aggregation_reference/selectionterm_aggregation.md