Added type hint to context function.
Removed reflection warnings in text search example.