多选题 : 在 Solr 建立索引时,下面哪些代码片段可以显著提升建立索引性能?
(A)lbClient.setRequestWriter(newBinaryRequestWriter());
(B)if(updateRequest.getDocumentsMap().size()>=10000){cloudSolrClient.request(updateRequest,collName);updateRequest.clear();}
(C).if(updateRequest.getDocuments().size()>=1000){cloudSolrClient.request(updateRequest,collName);updateRequest.clear();}
(D)SolrlnputDocumentdoc=newSolrlnputDocument();doc.addField(“id”,i.toString());doc.addField(“name”,”张三”+i);doc.addField(“features”,”test”+);doc.addField(“price”,(float)i*1.01);cloudSolrClient.add(doc);cloudSolrClient.commit();
参考答案
继续答题:下一题