org.apache.solr.common.SolrInputDocument.deepCopy()
public SolrInputDocument deepCopy() {
SolrInputDocument clone = new SolrInputDocument();
Set<Entry<String,SolrInputField>> entries = _fields.entrySet();
for (Map.Entry<String,SolrInputField> fieldEntry : entries) {
clone._fields.put(fieldEntry.getKey(), fieldEntry.getValue().deepCopy());
}
clone._documentBoost = _documentBoost;
return clone;
}
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(AddUpdateCommand)
org.apache.solr.update.processor.DistributedUpdateProcessor.getUpdatedDocument(AddUpdateCommand, long)
{
SolrInputDocument sdoc = cmd.getSolrInputDocument();
BytesRef id = cmd.getIndexedId();
SolrInputDocument oldDoc = RealTimeGetComponent.getInputDocument(cmd.getReq().getCore(), id);
for (SolrInputField sif : sdoc.values()) {
if ("add".equals(key)) {
updateField = true;
oldDoc.addField( sif.getName(), fieldVal, sif.getBoost());
} else if ("set".equals(key)) {
updateField = true;
oldDoc.setField(sif.getName(), fieldVal, sif.getBoost());
} else if ("inc".equals(key)) {
}
} else {
// normal fields are treated as a "set"
oldDoc.put(sif.getName(), sif);
}
}
}
if (searcher == null) {
searcherHolder = core.getRealtimeSearcher();
searcher = searcherHolder.get();
}
int docid = searcher.getFirstMatch(new Term(idField.getName(), idBytes));
org.apache.solr.handler.component.RealTimeGetComponent.toSolrInputDocument(Document, IndexSchema)
org.apache.solr.util.SolrPluginUtils.docListToSolrDocumentList(DocList, SolrIndexSearcher, Set<String>, Map<SolrDocument, Integer>)
public SolrInputDocument deepCopy() {
SolrInputDocument clone = new SolrInputDocument();
Set<Entry<String,SolrInputField>> entries = _fields.entrySet();
for (Map.Entry<String,SolrInputField> fieldEntry : entries) {
clone._fields.put(fieldEntry.getKey(), fieldEntry.getValue().deepCopy());
}
clone._documentBoost = _documentBoost;
return clone;
}
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(AddUpdateCommand)
org.apache.solr.update.processor.DistributedUpdateProcessor.getUpdatedDocument(AddUpdateCommand, long)
{
SolrInputDocument sdoc = cmd.getSolrInputDocument();
BytesRef id = cmd.getIndexedId();
SolrInputDocument oldDoc = RealTimeGetComponent.getInputDocument(cmd.getReq().getCore(), id);
for (SolrInputField sif : sdoc.values()) {
if ("add".equals(key)) {
updateField = true;
oldDoc.addField( sif.getName(), fieldVal, sif.getBoost());
} else if ("set".equals(key)) {
updateField = true;
oldDoc.setField(sif.getName(), fieldVal, sif.getBoost());
} else if ("inc".equals(key)) {
}
} else {
// normal fields are treated as a "set"
oldDoc.put(sif.getName(), sif);
}
}
}
if (searcher == null) {
searcherHolder = core.getRealtimeSearcher();
searcher = searcherHolder.get();
}
int docid = searcher.getFirstMatch(new Term(idField.getName(), idBytes));
org.apache.solr.handler.component.RealTimeGetComponent.toSolrInputDocument(Document, IndexSchema)
org.apache.solr.util.SolrPluginUtils.docListToSolrDocumentList(DocList, SolrIndexSearcher, Set<String>, Map<SolrDocument, Integer>)
No comments:
Post a Comment