The stock of a product is a characteristic. You first need to create a numeric derived property before you can use it in the relevance formula. Navigate to Catalog > Derived properties and create a new derived property like in the example below:
Query:
[Product].Voorraad as Waarde 1 as volgorde
NOTE: It's currently impossible for us to make English subqueries available. As you can see, they are in Dutch. For your convenience, we've added English buttons. Quick translation of the subqueries:
- Voorraad = Stock
- Waarde = Value
- volgorde = order
You can now add the property to the relevance formula.