A simple example of a valid Scheme search is:
(string=? (item-priority item) "A")
This uses the function item-priority to get the priority from item, where item is available during searching and represents an item being matched.
If you take a look at https://beorgapp.com/manual/library-org/ you'll see defined the other functions which can be used in matching (under the Org headline Items). You can then use Scheme logic functions such as or to combine these.