Only commit non-null values to Solr

This commit is contained in:
Brett Tasker 2017-04-26 23:19:44 +12:00
parent 4530fb21fe
commit ea944373bd
1 changed files with 4 additions and 1 deletions

View File

@ -544,7 +544,10 @@ abstract class SolrIndex extends SearchIndex
return;
}
$doc->setField($field['name'], $value);
// Only index fields that are not null
if ($value !== null) {
$doc->setField($field['name'], $value);
}
}
}