Skip to content

Image Orientation Criterion

The Orientation Search Criterion searches for image with specified orientation(s). Supported orientation values: landscape, portrait and square.

Arguments

  • fielDefIdentifier - string representing the identifier of the field
  • orientation - strings representing orientations

Limitations

ImageOrientation can be used on all search engines.

Example

PHP

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$query->query = new Criterion\Orientation('image', 'landscape');

// OR

$orientations = [
    'landscape',
    'portrait',
];

$query->query = new Criterion\Orientation('image', $orientations);

REST API

1
2
3
4
5
6
7
8
<Query>
    <Filter>
        <ImageOrientationCriterion>
            <fieldDefIdentifier>image</fieldDefIdentifier>
            <orientation>landscape</orientation>
        </ImageOrientationCriterion>
    </Filter>
</Query>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
    "ViewInput": {
        "identifier": "ImageOrientationCriterionTest",
        "Query": {
            "Filter": {
                "ImageOrientationCriterion": {
                    "fieldDefIdentifier": "image",
                    "orientation": "landscape"
                }
            }
        }
    }
}

OR

{
    "ViewInput": {
        "identifier": "ImageOrientationCriterionTest",
        "Query": {
            "Filter": {
                "ImageOrientationCriterion": {
                    "fieldDefIdentifier": "image",
                    "orientation": ["portrait", "landscape"]
                }
            }
        }
    }
}