|| force) { unIndexContent(context, handle); buildDocument(context, (Item) dso); buildDocument(context, (Collection) dso); log.info("Wrote Collection: " + handle + " to Index"); break; buildDocument(context, (Community) dso); log.info("Wrote Community: " + handle + " to Index"); break;
|| force) { unIndexContent(context, handle); buildDocument(context, (Item) dso); buildDocument((Collection) dso); log.info("Wrote Collection: " + handle + " to Index"); break; buildDocument((Community) dso); log.info("Wrote Community: " + handle + " to Index"); break;
SolrInputDocument doc = buildDocument(Constants.ITEM, item.getID(), handle, locations);
SolrInputDocument doc = buildDocument(Constants.ITEM, item.getID(), handle, locations);
/** * Build a Lucene document for a DSpace Community. * * @param community Community to be indexed * @throws SQLException * @throws IOException */ private void buildDocument(Community community) throws SQLException, IOException { // Create Document SolrInputDocument doc = buildDocument(Constants.COMMUNITY, community.getID(), community.getHandle(), null); // and populate it String name = community.getMetadata("name"); if (name != null) { doc.addField("name", name); } //Do any additional indexing, depends on the plugins List<SolrServiceIndexPlugin> solrServiceIndexPlugins = new DSpace().getServiceManager().getServicesByType(SolrServiceIndexPlugin.class); for (SolrServiceIndexPlugin solrServiceIndexPlugin : solrServiceIndexPlugins) { solrServiceIndexPlugin.additionalIndex(community, doc); } writeDocument(doc); }
/** * Build a Lucene document for a DSpace Collection. * * @param collection Collection to be indexed * @throws SQLException sql exception * @throws IOException IO exception */ private void buildDocument(Collection collection) throws SQLException, IOException { List<String> locations = getCollectionLocations(collection); // Create Lucene Document SolrInputDocument doc = buildDocument(Constants.COLLECTION, collection.getID(), collection.getHandle(), locations); // and populate it String name = collection.getMetadata("name"); if (name != null) { doc.addField("name", name); } //Do any additional indexing, depends on the plugins List<SolrServiceIndexPlugin> solrServiceIndexPlugins = new DSpace().getServiceManager().getServicesByType(SolrServiceIndexPlugin.class); for (SolrServiceIndexPlugin solrServiceIndexPlugin : solrServiceIndexPlugins) { solrServiceIndexPlugin.additionalIndex(collection, doc); } writeDocument(doc); }
throws SQLException, IOException { SolrInputDocument doc = buildDocument(Constants.COMMUNITY, community.getID(), community.getHandle(), null);
SolrInputDocument doc = buildDocument(Constants.COLLECTION, collection.getID(), collection.getHandle(), locations);