List of usage examples for org.apache.solr.common SolrInputDocument SolrInputDocument
public SolrInputDocument(Map<String, SolrInputField> fields)
From source file:com.hurence.logisland.service.solr.Solr_6_6_2_RecordConverter.java
License:Apache License
@Override protected SolrInputDocument createNewSolrInputDocument() { Map<String, SolrInputField> fields = new HashMap<>(); return new SolrInputDocument(fields); }
From source file:com.inqool.dcap.integration.oai.harvester.SolrExternalSourcesIndexer.java
License:Apache License
protected SolrInputDocument modelToSolrInputDoc(ZdoModel model) { logger.debug("Constructing new SolrInputDocument..."); final Map<String, SolrInputField> fields = new HashMap<>(); //Add all Dublin Core terms for (String property : DCTools.getDcTermList()) { SolrInputField field = new SolrInputField(property); List<String> values = model.getAll(new PropertyImpl("http://purl.org/dc/terms/" + property)); if (values.isEmpty()) continue; field.addValue(values, INDEX_TIME_BOOST); fields.put(property, field);//w w w .ja v a 2 s.c o m } //Add system fields SolrInputField field = new SolrInputField("id"); field.addValue(model.get(ZdoTerms.oaiIdentifier), INDEX_TIME_BOOST); fields.put("id", field); addSolrFieldFromFedoraProperty("inventoryId", ZdoTerms.inventoryId, model, fields); addSolrFieldFromFedoraProperty("source", ZdoTerms.source, model, fields); addSolrFieldFromFedoraProperty("zdoGroup", ZdoTerms.group, model, fields); return new SolrInputDocument(fields); }
From source file:edu.cornell.mannlib.vitro.webapp.searchengine.solr.SolrConversionUtils.java
License:Open Source License
private static SolrInputDocument convertToSolrInputDocument(SearchInputDocument doc) { SolrInputDocument solrDoc = new SolrInputDocument(convertToSolrInputFieldMap(doc.getFieldMap())); solrDoc.setDocumentBoost(doc.getDocumentBoost()); return solrDoc; }