Feature/758 add the ability to add search indexes to existing instances#784
Conversation
…matches with indexes from Sitecore
| { | ||
| int firstDigit = int.Parse(solrVersion[0].ToString()); | ||
|
|
||
| if (firstDigit >= 7) |
There was a problem hiding this comment.
Is it possible not rely on digit 7 in this case? This looks like hardcode.
There was a problem hiding this comment.
This is to check the Solr version is seven or higher
|
|
||
| public string SolrVersion; | ||
|
|
||
| public string SolrFolder; |
There was a problem hiding this comment.
Please add an indent between these properties.
| return; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Remove the unnecessary line.
|
|
||
| namespace SIM.Pipelines.InstallSearchIndexes | ||
| { | ||
| public class CreateSolrCoreAction : InstallSearchIndexesProcessor |
There was a problem hiding this comment.
Can we remove the "Action" suffix from the name since it is a processor?
|
|
||
| namespace SIM.Pipelines.InstallSearchIndexes | ||
| { | ||
| public class PopulateNewIndexAction : InstallSearchIndexesProcessor |
There was a problem hiding this comment.
Can we remove the "Action" suffix from the name since it is a processor?
In addition, I would suggest changing its name to "PopulateManagedSchema".
|
|
||
| private XmlDocumentEx GetXmlDocumenFromSolrResponse(string solrInfoUrl) | ||
| { | ||
| Stream response = RequestAndGetResponseStream(solrInfoUrl); |
|
|
||
| namespace SIM.Tool.Windows.MainWindowComponents.Helpers | ||
| { | ||
| public class ButtonAuthenticationHelper |
There was a problem hiding this comment.
Please consider renaming it to "SitecoreAuthenticationHelper" because it should be more obvious what functionality this class provides.
|
|
||
| if (!solrStateResolver.IsSolrAvailable(solrUrl)) | ||
| { | ||
| WindowHelper.ShowMessage($"Failed to access Solr at the following URL: {solrUrl}.\r\n Solr is not available.\r\nPlease make sure Solr is running and accessible.", |
There was a problem hiding this comment.
Remove the space before "Solr is not available.".
| } | ||
| } | ||
|
|
||
| SearchIndexesListBox.DataContext = CoreNamesCheckBoxItems; |
| It shows related cores that are missing on the Solr side and allows you to add them. "" /> | ||
| <step name=""STEP 2 of 2 - INSTALL SOLR CORES"" | ||
| type=""SIM.Tool.Windows.UserControls.Install.SearchIndexes.AvailableSearchIndexes, SIM.Tool.Windows"" /> | ||
| </steps> |
There was a problem hiding this comment.
Remove two spaces before the steps closing tag.
|
|
||
| namespace SIM.Pipelines.InstallSearchIndexes | ||
| { | ||
| public abstract class InstallSearchIndexesProcessor : Processor |
| private void CreateIndexDirectory(string solrVersion, string solrFolder, string newCorePath) | ||
| { | ||
| string sourcePath = GetSourceConfPath(solrVersion, solrFolder); | ||
| FileSystem.FileSystem.Local.Directory.Copy(sourcePath, newCorePath, recursive: true); |
There was a problem hiding this comment.
The "sourcePath" folder may not exist.
| new ButtonDefinition { Label = "Restore", Image = "/Images/$sm/box_out.png, SIM.Tool.Windows", Handler = new RestoreInstanceButton() }, | ||
| new ButtonDefinition { Handler = new ExportInstanceButton() }, | ||
| new ButtonDefinition { Label = "Export", Image = "/Images/$sm/download.png, SIM.Tool.Windows", Handler = new ExportInstanceButton() }, | ||
| new ButtonDefinition { Label = "Add Solr cores", Image = "/Images/$sm/search_index.png, SIM.Tool.Windows", Handler = new AddSolrCoresButton() }, |
There was a problem hiding this comment.
The icon quality is very low in the context menu.
Try to use:
Image = "/Images/32/search_index.png
Or:
Image = "/Images/$lg/search_index.png


No description provided.