Socket
Socket
Sign inDemoInstall

sitecore-switch-solr

Package Overview
Dependencies
0
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.13 to 2.0.0

.gitmodules

8

gulp-tasks/install-solr.js

@@ -21,3 +21,9 @@ /*jslint node: true */

var psFile = path.join(taskDir, "../powershell-scripts/install-solr.ps1");
var result = powershell.runSync(psFile, " -solrExtractLocation " + config.solrExtractLocation, path.join(taskDir, "../powershell-scripts"), callback);
var installSolrPsArguments = " -solrExtractLocation " + config.solrExtractLocation;
if ( config.asSolrCloud && config.solrCloudHosts && config.solrCloudThisHost )
installSolrPsArguments += " -asSolrCloud -copySitecoreCores=$false -solrCloudHosts " + config.solrCloudHosts + " -solrCloudThisHost " + config.solrCloudThisHost;
if ( config.solrVersion )
installSolrPsArguments += " -solrVersion " + config.solrVersion;
//var result = powershell.runSync(psFile, " -solrExtractLocation " + config.solrExtractLocation, path.join(taskDir, "../powershell-scripts"), callback);
var result = powershell.runSync(psFile, installSolrPsArguments, path.join(taskDir, "../powershell-scripts"), callback);
if (result > 0 )

@@ -24,0 +30,0 @@ {

@@ -27,3 +27,7 @@ /*jslint node: true */

powershell.runSync(psFile, " -webRootPath " + websiteRoot + " -solrExtractLocation " + config.solrExtractLocation, path.join(taskDir, "../powershell-scripts"), callback);
var sitecoreVersion = "8.2.161221"
if (build.sitecoreVersion )
sitecoreVersion = build.sitecoreVersion
powershell.runSync(psFile, " -webRootPath " + websiteRoot + " -solrExtractLocation " + config.solrExtractLocation + " -sitecoreVersion " + sitecoreVersion, path.join(taskDir, "../powershell-scripts"), callback);

@@ -30,0 +34,0 @@ build.logEvent("builder", "Sitecore switch to solr completed successfully, don't forget to rebuild indexes in Sitecores control panel");

#Sitecore switch to Solr npm gulp package
Provides a gulp task that installs Solr 4.10.4 and switches a Solr 8.1 installation to use it. Creates the needed Sitecore cores in the Solr installation.
Provides gulp tasks for installation and configuration of both Solr and Sitecore to work with each other.
It supports several versions of Sitecore and Solr and can work with both Solr standalone and SolrCloud.
Based on the great installation instructions from the sitecore community documentation at

@@ -16,3 +18,3 @@ https://sitecore-community.github.io/docs/search/solr/fast-track-solr-for-lazy-developers/

"dependencies": {
"sitecore-switch-solr": "^1.0.0"
"sitecore-switch-solr": "^2.0.0"
}

@@ -23,3 +25,3 @@ ```

It then provides a task called ```setup-solr``` that can be run from your solution's gulp file. It runs two different subtasks, one to install solr and configure the Sitecore cores, and another
It then provides a task called ```setup-solr``` that can be run from your solution's gulp file. It runs two different subtasks, one to install solr and configure the Sitecore cores/colletions, and another
to switch the Sitecore instance so that it uses Solr instead of Lucene, by enabling/disabling configuration files, copying the needed DLLs and modifying Global.asax.

@@ -54,5 +56,9 @@ The Solr installation task has to be run as administrator user (to create the Solr service), so the ```setup-solr``` has also to be run as administrator.

The gulp tasks expects two parameters in the solution-config.json file. These parameters go in the "configs" variable, and are named "websiteRoot" and "solrExtractLocation". For example:
The gulp tasks expects a minium of three parameters in the solution-config.json file. Two of these parameters go in the "configs" section, and are named "websiteRoot" and "solrExtractLocation" and the third go in the "sitecore" section and is called "version". For example:
```
{
"sitecore": {
"version": "8.2.161221",
},
"configs": [

@@ -64,3 +70,3 @@ {

"hostName": "Your.Website",
"solrExtractLocation": "C:\\"
"solrExtractLocation": "C:\\",
}

@@ -71,3 +77,40 @@ ]

The solrExtractLocation path specified where solr will be extracted and the webSitecore is the path to the webroot for the Sitecore instance. The Sitecore version should match the format seen in the example, but right now only the major and minor are used, and only Sitecore 8.1 and 8.2 are supported.
The Website folder should include all the Sitecore Website files, more specifically, the bin and App_config folder are expected to be there.
Aditionally the following configuration parameters should be used to specify your configuration needs:
```
configs -> config
-> solrVersion: Should be in the format that Solr is versioned, and should match a existing Solr Version. Ex: "5.1.0", "4.10.0", "6.5.0". Check Solrs download page for versions.
-> asSolrcloud: Install Solr ready to be used as a Solr Cloud instance. Creates configuration and collections. You have to specify solrCloudHosts and solrCloudThisHost for this to work. The content doesn't matter, it should just be set to something.
-> solrCloudHosts: List of Solr instances that will conform the SolrCloud ensemble. The list should be comma separated and include only hostname with port. See example below
-> solrCloudThishost: The hostname for the host that is actually being configured. No need to specify port.
```
Example of all configuration variables:
```
{
"sitecore": {
"version": "8.2.161221",
},
"configs": [
{
"name": "Debug",
"rootFolder": "c:\\websites\\Your.Website",
"websiteRoot": "c:\\websites\\Your.Website\\Website",
"hostName": "Your.Website",
"solrExtractLocation": "C:\\",
"solrVersion": "5.1.0",
"asSolrCloud": "yes",
"solrCloudHosts": "hostname1:2181,hostname2:2181"
"solrCloudThisHost": "hostname1"
}
]
}
```
**Please note it is up to the user to match Sitecore version and Solr version accordingly. We only provide suitable cores for Solr 4 and Solr 5, plus collection configuration for Solr5. See https://kb.sitecore.net/articles/227897 **
files/Clean SOLR cores 4.10.zip

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc