public void ReloadCore() { var coreName = "core-new"; var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() ); var reloadResponseHeader = solrCoreAdmin.Reload(coreName); Assert.AreEqual(reloadResponseHeader.Status, 0); }
public void Alias() { var coreName = "core-new"; var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() ); var aliasResponseHeader = solrCoreAdmin.Alias(coreName, "corefoo"); Assert.AreEqual(aliasResponseHeader.Status, 0); }
public void GetStatusForNamedCore() { var coreName = "core-new"; var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), GetHeaderParser(), GetStatusResponseParser()); var result = solrCoreAdmin.Status(coreName); Assert.IsNotEmpty(result.Name); Assert.AreEqual(coreName, result.Name); }
public void CreateSwapCore() { var coreName = "core-swap"; var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() ); var createResponseHeader = solrCoreAdmin.Create(coreName, instanceDir); Assert.AreEqual(createResponseHeader.Status, 0); var results = solrCoreAdmin.Status(coreName); Assert.IsNotEmpty(results); Assert.IsNotEmpty(results[0].Name); Assert.AreEqual(coreName, results[0].Name); }
public void Create() { var coreName = "core-new"; var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() ); try { var createResponseHeader = solrCoreAdmin.Create(coreName, null, null, null, null); } catch (ArgumentException) { // Should get an Exception here because instance directory was not specified. var createResponseHeader = solrCoreAdmin.Create(coreName, instanceDir); Assert.AreEqual(createResponseHeader.Status, 0); } var result = solrCoreAdmin.Status(coreName); Assert.IsNotNull(result); Assert.IsNotEmpty(result.Name); Assert.AreEqual(coreName, result.Name); }
public void GetStatusForAllCores() { var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl)); var results = solrCoreAdmin.Status(); Assert.IsNotEmpty(results); }
public void Unload() { var headerParser = new HeaderResponseParser<string>(); var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), headerParser); 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 SwapCores() { var headerParser = new HeaderResponseParser<string>(); var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), headerParser); var swapResponseHeader = solrCoreAdmin.Swap("core-new", "core-swap"); Assert.AreEqual(swapResponseHeader.Status, 0); }
public void ReloadCore() { var coreName = "core-new"; var headerParser = new HeaderResponseParser<string>(); var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), headerParser); var reloadResponseHeader = solrCoreAdmin.Reload(coreName); Assert.AreEqual(reloadResponseHeader.Status, 0); }
public void GetStatusForNamedCore() { var coreName = "core-new"; var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl)); var results = solrCoreAdmin.Status(coreName); Assert.IsNotEmpty(results[0].Name); Assert.AreEqual(coreName, results[0].Name); }
public void GetStatusForAllCores() { var solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), GetHeaderParser(), GetStatusResponseParser()); var results = solrCoreAdmin.Status(); Assert.IsNotEmpty(results); }
public void Unload() { var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() ); var swapUnloadResponseHeader = solrCoreAdmin.Unload("core-swap", UnloadCommand.Delete.Index); Assert.AreEqual(swapUnloadResponseHeader.Status, 0); var newUnloadResponseHeader = solrCoreAdmin.Unload("core-new", UnloadCommand.Delete.Index); Assert.AreEqual(newUnloadResponseHeader.Status, 0); }
public void SwapCores() { var solrCoreAdmin = new SolrCoreAdmin( new SolrConnection( solrUrl ), GetHeaderParser(), GetStatusResponseParser() ); var swapResponseHeader = solrCoreAdmin.Swap("core-new", "core-swap"); Assert.AreEqual(swapResponseHeader.Status, 0); }