@@ -151,8 +151,7 @@ public function alterQuery(Request $request, SolariumQueryInterface &$solarium_q
151151 $ field_mapping = $ backend ->getSolrFieldNamesKeyedByLanguage ($ language_ids , $ index );
152152
153153 // Disable for Lucene and wildcard
154- //$q[] = "{!boost b=boost_document}";
155-
154+ // $q[] = "{!boost b=boost_document}";
156155 // Create a flag for active/inactive dismax.
157156 $ config = \Drupal::config (SettingsForm::CONFIG_NAME );
158157 $ isDismax = $ config ->get (SettingsForm::EDISMAX_SEARCH_FLAG );
@@ -207,10 +206,11 @@ public function alterQuery(Request $request, SolariumQueryInterface &$solarium_q
207206 if ($ isSearchAllFields ) {
208207 // Get configured query fields from settings.
209208 $ configured_query_fields = $ config ->get (SettingsForm::QUERY_FIELDS ) ?: [];
210-
211- // field_mapping structure: [field_id => [language => solr_field_name]]
209+
210+ // field_mapping structure:
211+ // [field_id => [language => solr_field_name]].
212212 foreach ($ field_mapping as $ field_id => $ languages ) {
213- foreach ($ languages as $ lang => $ solr_field_name ) {
213+ foreach ($ languages as $ solr_field_name ) {
214214 // bs_ are boolean fields, do not work well with text search.
215215 if (substr ($ solr_field_name , 0 , 3 ) !== "bs_ " ) {
216216
@@ -230,7 +230,7 @@ public function alterQuery(Request $request, SolariumQueryInterface &$solarium_q
230230 $ dismax ->setQueryFields ($ query_fields );
231231 }
232232
233- // if all fields are searched, use the query_fields for highlighting.
233+ // If all fields are searched, use the query_fields for highlighting.
234234 if ($ isSearchAllFields && isset ($ query_fields )) {
235235 // Convert back to an array.
236236 $ highlight_source_fields = explode (" " , $ query_fields );
@@ -241,7 +241,7 @@ public function alterQuery(Request $request, SolariumQueryInterface &$solarium_q
241241
242242 if ($ backend ->getConfiguration ()['highlight_data ' ]) {
243243 // Just highlight string and text fields to avoid Solr exceptions.
244- // Exclude tm_X3b_*_fulltext_title
244+ // Exclude tm_X3b_*_fulltext_title.
245245 $ highlighted_fields = array_filter (array_unique ($ highlight_source_fields ), function ($ v ) {
246246 return !empty ($ v ) && (preg_match ('/^t.*?[sm]_/ ' , $ v ) || preg_match ('/^s[sm]_/ ' , $ v )) && !preg_match ('/^tm_X3b_.*_fulltext_title$/ ' , $ v );
247247 });
@@ -256,7 +256,7 @@ public function alterQuery(Request $request, SolariumQueryInterface &$solarium_q
256256 // Since we are getting the highlighting result from Solr instead
257257 // of using the Search API processor to create one, we just need
258258 // make this field non-empty.
259- //$search_api_query->keys("advanced search");
259+ // $search_api_query->keys("advanced search");.
260260 }
261261
262262 $ solarium_query ->setQuery ($ q );
0 commit comments