Checks if the element map with the specified identifier contains elements associated with at least one of the given keys.
Effectively, this function does the same as the following expression:
However, it will work somewhat faster.countElementsByKeys ( elementMapId, keys, filterQuery ) > 0
Parameters:
elementMapId
The element map identifierNote: When the element map with such an identifier does not exist, the generator raises an error.
keys
The array containing the hash keys to test
filterQuery
This parameter allows you to specify an additional condition on the elements. Even if the elements associated with the keys are found, only those will be accounted which satisfy that filter condition.When specified, this should be a boolean subquery created with
BooleanQuery()
function. The subquery will be processed against each initially selected element and should returntrue
if the element must be counted andfalse
otherwise. The tested element is passed as the generator context element.
Returns:
true
, if the element map contains at least one element that is associated with one of the specified keys and satisfies the filter condition (when specified);false
otherwise.
See Also:
checkElementMap(), findElementsByKeys(), countElementsByKeys()