Documentation Center

Configuring deployer for Solr

The Search module uses SI4T to connect the publishing process to the Apache Solr search indices. Configure your deployer web application to use the SI4T storage extension.

Before you begin

In order to install SI4T in a SDL Web 8 deployer, you must install hotfix CD_8.1.0.1418. Contact the SDL Customer Support to learn where you can obtain the hotfix.

About this task

In case you have an IIS web application for your deployer application (HTTP upload), you can use the deployer-install.ps1 PowerShell script to deploy the Search Module's indexer. Starting from DXA version 1.3, you can also use this script for the standalone SDL Web 8 Deployer Service on Windows.

Here is an example of the deployer-install.ps1 PowerShell script:
'.\deployer-install.ps1' -deployerRootFolder "c:\inetpub\wwwroot\mysite" -indexerUrl "http://localhost:8080/solr/staging"
Otherwise, use the following procedure.

Procedure

  1. In the Search Module, go to the deployer/config folder.
  2. Copy the SearchDAOBundle.xml file to the bin/config directory of your deployer application.
  3. In the bin/config directory, edit the cd_storage_conf.xml file:
    <Bundle src="SearchDAOBundle.xml"/>
  4. Update the <Storage/> element with type persistence that corresponds to the sites that you are deploying the reference implementation for to change the Class attribute from com.tridion.storage.persistence.JPADAOFactory to com.tridion.storage.si4t.JPASearchDAOFactory.
  5. Inside this <Storage/> element, add:
    <Indexer Class="org.si4t.solr.SolrIndexer" DefaultCoreUrl="http://localhost:8080/solr/staging-or-live" Mode="http"           DocExtensions="pdf,docx,doc,xls,xlsx,pptx,ppt" />
    Your <Storage/> element should look in the following way:
    <Storages>
        <StorageBindings>
            <Bundle src="SearchDAOBundle.xml"/>
        </StorageBindings>
        <Storage
            Type="persistence" Id="defaultdb" dialect="MSSQL"
            Class="com.tridion.storage.si4t.JPASearchDAOFactory">
            <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
            <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                <Property Name="serverName" Value="[SERVERNAME]" />
                <Property Name="portNumber" Value="[DBPORT]" />
                <Property Name="databaseName" Value="[DBNAME]" />
                <Property Name="user" Value="[DBBROKERUSERNAME]" />
                <Property Name="password" Value="[DBBROKERPASSWORD]" />
            </DataSource>
            <Indexer Class="org.si4t.solr.SolrIndexer" DefaultCoreUrl="http://localhost:8080/solr/staging" Mode="http"     DocExtensions="pdf,docx,doc,xls,xlsx,pptx,ppt"/>
        </Storage>
    </Storages>
  6. Copy si4t-solr.jar and its third party library dependencies from deployer\lib\si4t-solr to the lib folder of your deployer application.
  7. Restart your deployer application(s).