mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Only commit non-null values to Solr
This commit is contained in:
parent
4530fb21fe
commit
ea944373bd
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user