Complex event processing for content-based text, image, and video retrieval