Add config mechanism. Support max_results configuration.