Fixed the issue show no results for Lucene search (comment out $q[] = "{!boost b=boost_document}";)

This commit is contained in:
Kyle Huynh 2021-12-06 10:20:40 -05:00
parent af67bfcd2f
commit 969dc21bb6

View file

@ -148,7 +148,10 @@ class AdvancedSearchQuery {
$backend = $index->getServerInstance()->getBackend(); $backend = $index->getServerInstance()->getBackend();
$language_ids = $search_api_query->getLanguages(); $language_ids = $search_api_query->getLanguages();
$field_mapping = $backend->getSolrFieldNamesKeyedByLanguage($language_ids, $index); $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. // To support negative queries we must first bring in all documents.
$q[] = $this->negativeQuery($terms) ? "*:*" : ""; $q[] = $this->negativeQuery($terms) ? "*:*" : "";
$term = array_shift($terms); $term = array_shift($terms);