Pipelines/Steps/Install/OnPrem/Sitecore/XP/Solr/9.0/PreInstalled/Create-SolrXConnectCoresViaHTTP.ps1

$ErrorActionPreference = "Stop"

Write-Output "Create xConnect Solr cores via HTTP started..."

$prefix = $SAFConfiguration.prefix
$configPath = "$PSScriptRoot\..\..\..\..\Solr\PreInstalled\custom-solrHTTP.json"
$cores = @("xdb", "xdb_rebuild")

foreach ($core in $cores) {
    $solrParams = @{
        Path       = $configPath
        SolrUrl    = $SAFSolrServiceURL
        CorePrefix = $prefix  
        CoreName   = $core
    }
    Install-SitecoreConfiguration @solrParams
}

Write-Output "Create xConnect Solr cores via HTTP done."