add 'max-entries' config to limit the number of results