public void Unload() { var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(SolrUrl), GetHeaderParser(), GetStatusResponseParser()); var swapUnloadResponseHeader = solrCoreAdmin.Unload(CoreSwap, UnloadCommand.Delete.Index); Assert.AreEqual(swapUnloadResponseHeader.Status, 0); var newUnloadResponseHeader = solrCoreAdmin.Unload(CoreNew, UnloadCommand.Delete.Index); Assert.AreEqual(newUnloadResponseHeader.Status, 0); }
public void Unload() { var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), GetHeaderParser(), GetStatusResponseParser()); var swapUnloadResponseHeader = solrCoreAdmin.Unload("core-swap", true); Assert.AreEqual(swapUnloadResponseHeader.Status, 0); var newUnloadResponseHeader = solrCoreAdmin.Unload("core-new", true); Assert.AreEqual(newUnloadResponseHeader.Status, 0); }
public void Unload() { var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), GetHeaderParser(), GetStatusResponseParser()); //var swapUnloadResponseHeader = solrCoreAdmin.Unload("core-swap", UnloadCommand.Delete.Index); //Assert.Equal(swapUnloadResponseHeader.Status, 0); var newUnloadResponseHeader = solrCoreAdmin.Unload("core-new", UnloadCommand.Delete.Index); Assert.Equal(0, newUnloadResponseHeader.Status); }
public void Create() { var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(SolrUrl), GetHeaderParser(), GetStatusResponseParser()); var status = solrCoreAdmin.Status(CoreNew); if (!string.IsNullOrEmpty(status.Name)) { solrCoreAdmin.Unload(CoreNew); } try { var createResponseHeader = solrCoreAdmin.Create(CoreNew, null, null, null, null); } catch (ArgumentException) { // Should get an Exception here because instance directory was not specified. var istanceDir = DirectoryUtility.GetCoreIstanceDirectory(CoreNew); var createResponseHeader = solrCoreAdmin.Create(CoreNew, istanceDir); Assert.AreEqual(createResponseHeader.Status, 0); } var result = solrCoreAdmin.Status(CoreNew); Assert.IsNotNull(result); Assert.IsNotEmpty(result.Name); Assert.AreEqual(CoreNew, result.Name); }