Pipelines/Steps/Install/OnPrem/Sitecore/XM/Solr/9.0/Create-CustomSolrCores.ps1
$ErrorActionPreference = "Stop" Write-Output "Add custom Solr cores started..." if (($null -eq $SAFConfiguration.search.solr.customCores) -or ($SAFConfiguration.search.solr.customCores.Count -lt 1)) { Write-Output "No custom Solr cores found. Skipping..." } else { $prefix = $SAFConfiguration.prefix $configPath = "$PSScriptRoot\custom-solr.json" $solrService = $SAFConfiguration.search.solr.serviceName foreach ($core in $SAFConfiguration.search.solr.customCores) { $solrParams = @{ Path = $configPath SolrUrl = $SAFSolrServiceURL SolrRoot = $SAFSolrServiceDir SolrService = $solrService CorePrefix = $prefix CoreName = $core } Install-SitecoreConfiguration @solrParams } } Write-Output "Add custom Solr cores done." |