Skip to content

Commit

Permalink
Merge pull request #59 from joshdentremont/patch-2
Browse files Browse the repository at this point in the history
Add parentheses to advanced search queries
  • Loading branch information
aOelschlager authored Jan 15, 2025
2 parents 4452d62 + c980ec4 commit e05c783
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AdvancedSearchQueryTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,11 @@ public function toSolrQuery(array $solr_field_mapping) {
}
// Fixed for https://github.com/digitalutsc/advanced_search/issues/4
if ($this->field !== "all"){
$search_fields = "";
$search_fields = "(";
foreach ($solr_field_mapping[$this->field] as $field) {
$search_fields .= " $field:$value";
}
$search_fields .= ")";
return $search_fields;
}
return $value;
Expand Down

0 comments on commit e05c783

Please sign in to comment.