Last active
June 12, 2019 12:45
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using System.Reflection | |
@using Sitecore.ContentSearch | |
@using Sitecore.ContentSearch.SolrProvider | |
@using Sitecore.ContentSearch.SolrProvider.Agents | |
<html> | |
<body> | |
Solr Status: @SolrStatus.OkSolrStatus() | |
<br /> | |
Solr Last Status: @typeof(IndexingStateSwitcher).GetField("lastSolrConnectionStatus", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy).GetValue(null) | |
<br /> | |
Solr Indexes | |
<table> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>IsInitialized</th> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach (AbstractSearchIndex index in ContentSearchManager.Indexes) | |
{ | |
<tr> | |
<td>@index.Name</td> | |
<td>@index.IsInitialized</td> | |
@if (!index.IsInitialized) | |
{ | |
index.Initialize(); | |
} | |
</tr> | |
} | |
</tbody> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment