-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/758 add the ability to add search indexes to existing instances #784
base: develop
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible not rely on digit 7 in this case? This looks like hardcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to check the Solr version is seven or higher
|
||
public string SolrVersion; | ||
|
||
public string SolrFolder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an indent between these properties.
return; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the unnecessary line.
|
||
namespace SIM.Pipelines.InstallSearchIndexes | ||
{ | ||
public class CreateSolrCoreAction : InstallSearchIndexesProcessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space.
|
||
namespace SIM.Tool.Windows.MainWindowComponents.Helpers | ||
{ | ||
public class ButtonAuthenticationHelper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the space before "Solr is not available.".
} | ||
} | ||
|
||
SearchIndexesListBox.DataContext = CoreNamesCheckBoxItems; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove two spaces before the steps closing tag.
|
||
namespace SIM.Pipelines.InstallSearchIndexes | ||
{ | ||
public abstract class InstallSearchIndexesProcessor : Processor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "sourcePath" folder may not exist.
@@ -1158,6 +1164,7 @@ private static GroupDefinition GetManageGroupDefinition() | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.