Commit 2324e66f authored by Sutharsan's avatar Sutharsan Committed by borisson_

Issue #2897654 by Sutharsan: Performance improvement for...

Issue #2897654 by Sutharsan: Performance improvement for SearchApiBaseFacetSource::getQueryTypesForFacet
parent fe311204
......@@ -118,10 +118,8 @@ abstract class SearchApiBaseFacetSource extends FacetSourcePluginBase {
$backend = $server->getBackend();
$fields = $this->index->getFields();
foreach ($fields as $field) {
if ($field->getFieldIdentifier() == $field_id) {
return $this->getQueryTypesForDataType($backend, $field->getType());
}
if (isset($fields[$field_id])) {
return $this->getQueryTypesForDataType($backend, $fields[$field_id]->getType());
}
throw new InvalidQueryTypeException("No available query types were found for facet {$facet->getName()}");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment