Skip to content

Commit

Permalink
Fixed the issue show no results for Lucene search (comment out $q[] =…
Browse files Browse the repository at this point in the history
… "{!boost b=boost_document}";)
  • Loading branch information
kylehuynh205 committed Dec 6, 2021
1 parent af67bfc commit 969dc21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/AdvancedSearchQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ public function alterQuery(Request $request, SolariumQueryInterface &$solarium_q
$backend = $index->getServerInstance()->getBackend();
$language_ids = $search_api_query->getLanguages();
$field_mapping = $backend->getSolrFieldNamesKeyedByLanguage($language_ids, $index);
$q[] = "{!boost b=boost_document}";

// disable for Lucene and wildcard
//$q[] = "{!boost b=boost_document}";

// To support negative queries we must first bring in all documents.
$q[] = $this->negativeQuery($terms) ? "*:*" : "";
$term = array_shift($terms);
Expand Down

0 comments on commit 969dc21

Please sign in to comment.