优化k8s配置

This commit is contained in:
2022-07-13 13:34:39 +08:00
parent b201f175a0
commit eeb9f2c924
3 changed files with 11 additions and 9 deletions
@@ -131,7 +131,7 @@ public class SolrServerImpl implements SolrServer
private void addToSolr0(final HttpSolrServer solrServer, final List<SolrInputDocument> documents, int errorCount) {
try {
if (null != documents && !documents.isEmpty()) {
solrServer.add((Collection)documents);
solrServer.add(documents);
solrServer.commit();
}
}
@@ -226,7 +226,7 @@ public class SolrServerImpl implements SolrServer
if (doc.get("$boosts") != null && doc.get("$boosts") instanceof Map) {
boostsMap = (Map<String, Float>)doc.get("$boosts");
if (boostsMap.containsKey("$doc_boost")) {
document.setDocumentBoost(boostsMap.get("$doc_boost").floatValue());
document.setDocumentBoost(((Number) boostsMap.get("$doc_boost")).floatValue());
}
}
for (final Index index : indexes) {
@@ -235,10 +235,10 @@ public class SolrServerImpl implements SolrServer
final Object value = doc.get(key);
final SolrInputField field = new SolrInputField(key);
if (value instanceof ObjectId) {
field.setValue((Object)value.toString(), 1.0f);
field.setValue(value.toString(), 1.0f);
}
else if (boostsMap != null && boostsMap.containsKey(key)) {
field.setValue(value, boostsMap.get(key).floatValue());
field.setValue(value, ((Number) boostsMap.get(key)).floatValue());
}
else {
field.setValue(value, 1.0f);