Skip to content

Commit

Permalink
EWPP-4747: Add support of unstemmed fulltext fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergepavle committed Sep 19, 2024
1 parent b629efd commit d3ca098
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Plugin/facets/query_type/Fulltext.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public function execute() {
$field_identifier = $this->facet->getFieldIdentifier();
// Add the filter to the query if there are active values.
$active_items = $this->facet->getActiveItems();
// For unstemmed text fields, we can add the condition directly.
$field_type = $this->facet->getFacetSource()->getIndex()->getField($field_identifier)->getType();
if (!empty($active_items) && $field_type === 'solr_text_unstemmed') {
$query->addCondition($field_identifier, $active_items);
return;
}
$widget_config = $this->facet->getWidgetInstance()->getConfiguration();
foreach ($active_items as $value) {
// To guarantee several facets can check for keywords.
Expand Down

0 comments on commit d3ca098

Please sign in to comment.