DiscoveryFilter has THRESHOLD_MAXRECORDS configurable through 'lucene.maxrecords.threshold' parameter in gpt.xml.