Fix for Jenkins advice on SignificantTermsAggregatorFactory, changing a small switch statement to an if-else