Searching: Predicate expressions

Predicate expressions are the real powerhouse of VaeQL. You can search and filter to only return results that match specific requirements. Predicate expressions are built by putting conditions in square brackets ([]) at the end of the path.

In this example, we search for items with a price of less than $5:

<v:collection path="items[price<5]">
 ...
</v:collection>

You may specify multiple expressions. Just stack them up. This would search for items with a price of less than $5 and a color of White.

<v:collection path="items[price<5][color='White']">
 ...
</v:collection>

You may also use request parameters inside predicate expressions:

<v:collection path="items[price<$max_price]">
 ...
</v:collection>