Well, I guess the spec is more specific! You read the spec correctly but misinterpreted my blog.
Specifically (pun intended), what I meant to say in the blog is that you select the types of records and names of properties that you want in the result set, followed by the constraints (like SQL).
So, in your example, to process your itemTemplate, I would note that you want records of type "record1", then I would look for items with a record of type "record2". What I would return is only the "record1" type records for these items. It's an interesting question of what is returned for items that only have a "record2" record. I think I would still return an empty item, because the item met the constraints.
Specifically (pun intended), what I meant to say in the blog is that you select the types of records and names of properties that you want in the result set, followed by the constraints (like SQL).
So, in your example, to process your itemTemplate, I would note that you want records of type "record1", then I would look for items with a record of type "record2". What I would return is only the "record1" type records for these items. It's an interesting question of what is returned for items that only have a "record2" record. I think I would still return an empty item, because the item met the constraints.