weiwang19 commented on code in PR #2046: URL: https://github.com/apache/solr/pull/2046#discussion_r1408097780
########## solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java: ########## @@ -263,4 +267,51 @@ private void addDocsRandomly() throws IOException, SolrServerException { solrCluster.getSolrClient().commit("collection1_local"); solrCluster.getSolrClient().commit("collection2_local"); } + + @Test + @SuppressWarnings("unchecked") + public void testDisableDistribStats() throws Exception { + + // single collection with implicit router + createCollection(COLLECTION, "conf1", ImplicitDocRouter.NAME); + SolrClient client = solrCluster.getSolrClient(); + + SolrInputDocument doc = new SolrInputDocument(); + doc.setField("id", "1"); + doc.setField("cat", "tv"); + doc.addField(ShardParams._ROUTE_, "a"); + client.add(COLLECTION, doc); + + doc = new SolrInputDocument(); + doc.setField("id", "2"); + doc.setField("cat", "ipad"); + doc.addField(ShardParams._ROUTE_, "b"); + client.add(COLLECTION, doc); Review Comment: added commit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org