matchMetadata for examining metadata when defining rules