mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
Add null check in SolrServiceFileInfoPlugin for index-discovery
This commit is contained in:
@@ -52,6 +52,8 @@ public class SolrServiceFileInfoPlugin implements SolrServiceIndexPlugin {
|
|||||||
List<Bitstream> bitstreams = bundle.getBitstreams();
|
List<Bitstream> bitstreams = bundle.getBitstreams();
|
||||||
if (bitstreams != null) {
|
if (bitstreams != null) {
|
||||||
for (Bitstream bitstream : bitstreams) {
|
for (Bitstream bitstream : bitstreams) {
|
||||||
|
if (bitstream != null)
|
||||||
|
{
|
||||||
document.addField(SOLR_FIELD_NAME_FOR_FILENAMES, bitstream.getName());
|
document.addField(SOLR_FIELD_NAME_FOR_FILENAMES, bitstream.getName());
|
||||||
// Add _keyword and _filter fields which are necessary to support filtering and faceting
|
// Add _keyword and _filter fields which are necessary to support filtering and faceting
|
||||||
// for the file names
|
// for the file names
|
||||||
@@ -75,4 +77,5 @@ public class SolrServiceFileInfoPlugin implements SolrServiceIndexPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user