Issue #2897654 by Sutharsan: Performance improvement for SearchApiBaseFacetSource::getQueryTypesForFacet