Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/385#discussion_r191401550
--- Diff: solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java
---
@@ -521,6 +682,23 @@ private void attachSubDocs(Element parent, String
relation, int typeValue) {
attachField(document, type, String.valueOf(typeValue));
}
}
+
+ private void indexSolrInputDocumentsDirectly(List<SolrInputDocument>
docs) throws IOException {
+ SolrQueryRequest coreReq = new LocalSolrQueryRequest(h.getCore(), new
ModifiableSolrParams());
+ AddUpdateCommand updateCmd = new AddUpdateCommand(coreReq);
+ for (SolrInputDocument doc: docs) {
+ long version = getNewClock();
+ updateCmd.setVersion(Math.abs(version));
+ updateCmd.solrDoc = doc;
+ h.getCore().getUpdateHandler().addDoc(updateCmd);
+ updateCmd.clear();
+ }
+ assertU(commit());
--- End diff --
randomly commit, thus produce different segments?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]