6

We tried SI4T with SDL Tridion 2013 (windows 2012) and we found that when we publish a page we are able to see the index data on the page, but it does not update the search Solr data segments.

One thing we noticed was the RegisterAction is not being called please refer to the cd-core log for your reference the highlighted line on the log file.

2013-07-23 17:45:46,659 DEBUG FSSearchDAOFactory - Commit Indexing Start
2013-07-23 17:45:46,659 INFO FSSearchDAOFactory - End committing transaction: tcm:0-2298-66560
2013-07-23 17:45:46,660 INFO FSSearchDAOFactory - Committing Search took: 1 ms.
2013-07-23 17:45:46,660 INFO FSSearchDAOFactory - Total Commit Time was: 6 ms.
2013-07-23 17:45:46,660 DEBUG FSSearchDAOFactory - Register currently contains:
2013-07-23 17:45:46,660 DEBUG FSSearchDAOFactory - Clearing register for transaction:tcm:0-2298-66560
2013-07-23 17:45:46,663 DEBUG FSEntityManager - Starting commit on transaction tcm:0-2298-66560.
2013-07-23 17:45:46,663 DEBUG FSEntityManager - Preparing files for rollback just in case.
2013-07-23 17:45:46,664 INFO FSEntityManager - Commit successful for transaction tcm:0-2298-66560.
2013-07-23 17:45:46,664 DEBUG FSEntityManager - Cleaning up transaction tcm:0-2298-66560.

The published aspx page does not load properly , please refer to the content shown below.

Line 1:  <!-- INDEX-DATA-START:
<indexdata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <url>/en/about/test.aspx</url>
  <title>test</title>
  <publicationid>14</publicationid>
  <schemaid>115</schemaid>
  <itemtype>64</itemtype>
  <parentsgid>117</parentsgid>
  <sgid>117</sgid>
  <sgid>5</sgid>
  <type>0</type>
  <body>test</body>
  <custom />
</indexdata>:INDEX-DATA-END -->

We followed the steps provided in the webinar, please let us know if anyone has faced the same issue?

5

Thanks for the documentation Raimond. It was very helpful.

Initially we faced some problems, but after removing few jar files and config updates it worked. This is now really working well with Solr 4.3.1. I really appreciate your work guys, this helped us solve many problems.

You have to do the following things to make it work with SDL Tridion 2013

  1. Follow the steps described in the wiki SI4T/Solr Configuration 101
  2. Remove ejb3-persistence.jar because hibernate-jpa-2.0-api.jar is used
  3. Remove hibernate-annotations.jar it is included in the latest hibernate-core
  4. We can either remove hibernate-valitor.jar or update to hibernate-validator 4.1.0 version
  5. Changed the storage and bundle config files - wiki documentation contains references to com.tridion.extensions*, which we changed to com.tridon.storage.si4t* and org.si4t*

For reference purpose I have shared the libraries and config files that is working for us - Solr Search Integration SDL Trdion 2013 Deployer LIB & Conf.rar

  • That is great! Thank you very much for sharing your config and lib directory. I will update the docs this week and mention you guys of course. :) And apologies for the namespaces - I had uploaded an old version. – Raimond Jul 25 '13 at 10:16
  • i have to mention--- if the server is down, publishing gets failed and in a way this is good because we don't have crawler to index the content. But this also makes CM dependant on search server. based on our requirements we will be modifying the code to capture the connection exception and log it, but allow the publishing to happen. we can then re publish the pages after the search server is up and running. - have to find a better solution for this. – Mohan Jul 25 '13 at 10:21
  • While I understand your requirement, this behaviour is by design - with the philosophy that any page which fails publishing should not be on the webserver or in the search index. We used the Tridion transaction mechanism for it. You can simply turn it off by surrounding indexing with a try/catch, but when everything is stable and running production I would recommend to turn on the transactional nature of indexing. – Raimond Jul 25 '13 at 10:29
  • You are right and i agree with you.. In our case page should be available in the website even if it is not in the search index. Based on the log we will then fix the search server and republish the pages so that it gets indexed :) – Mohan Jul 25 '13 at 10:34
  • Sounds good to me :) – Raimond Jul 25 '13 at 10:39
4

There are a couple of things to check to see whether the setup has been configured properly.

  1. Can you post the relevant parts of your cd_storage_conf.xml ? Have you for instance configured the SearchDAOBundle.xml file in the storage configuration?
  2. Are all the relevant jar files placed in the lib directory of the deployer?
  3. Can you post your logback configuration for the deployer? Usually the error appears if you enable logging for the org.si4t.* namespace and the com.tridion.extensions.* namespace.
  4. I presume that the Solr instance is running and is accessible by the deployer? Are your configured cores loading properly?

Update

I have written a bit about configuring SI4T/ Solr on this SI4T/Solr Configuration 101 page. If you have any questions, let me know. :)

3

Thanks for your response.

1) . Please note we missed to configure the SearchDAOBundle.xml. Please can you provide a sample of SearchDAOBundle so we can add the fields accordingly. This will speed things .

Storage config

<Storage Type="filesystem" Class="com.tridion.storage.si4t.FSSearchDAOFactory" Id="defaultFile" defaultFilesystem="false">
            <Root Path="C:\WWW\" />
            <Indexer Class="org.si4t.solr.SolrIndexer" Mode="http" DefaultCoreUrl = "http://localhost:8983/tridion" DocExtensions="docx,doc,xls"/>
        </Storage>
        <Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
            <Root Path="C:\tridion\data" />
        </Storage>

    <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="broker" />
                <Property Name="portNumber" Value="1433" />
                <Property Name="databaseName" Value="Broker" />
                <Property Name="user" Value="Broker" />
                <Property Name="password" Value="******" />
            </DataSource>
            <Indexer Class="org.si4t.solr.SolrIndexer" Mode="http" DefaultCoreUrl="http://localhost:8983/tridion" DocExtensions="pdf,docx,doc,xls,xlsx,pptx,ppt">
            <Urls>
            <!-- override specific Publications -->
            <Url Value="http://localhost:8983/tridion" Id="14" />
            </Urls>
            </Indexer>
        </Storage>

2) regarding the lib file we moved the following lib files under deployer

storage-extensions\dist\si4t.jar storage-extensions\lib\tridion-storage-search-extension-1.1.jar storage-extensions\lib\slf4j-api.jar

Please let me know if we need to move any other jar files . from the webinar it was mentioned to move only the si4t.jar and slf4j-api.jar jar to under deployer . Please calrify.

3) please find the logback.xml file details for your reference , please let us know how to enable the logging for slf4j on logbaxk.xml.

<?xml version="1.0" encoding="UTF-8"?>

<!-- Appenders -->
<appender name="rollingTransportLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_transport.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
        <charset>${log.encoding}</charset>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>
<appender name="rollingDeployerLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_deployer.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
        <charset>${log.encoding}</charset>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>
<appender name="rollingMonitorLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_monitor.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
        <charset>${log.encoding}</charset>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>
<appender name="rollingCoreLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_core.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
        <charset>${log.encoding}</charset>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>
<appender name="rollingSessionPreviewLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_preview.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
        <charset>${log.encoding}</charset>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>
<appender name="rollingSolrIndexerLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_solrIndexer.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
        <charset>${log.encoding}</charset>
        <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>
<!-- Loggers -->
<logger name="com.tridion" level="${log.level}"/>
<logger name="com.tridion.transport">
    <appender-ref ref="rollingTransportLog"/>
</logger>
<logger name="com.tridion.transport.HTTPSReceiverServlet">
    <appender-ref ref="rollingDeployerLog"/>
</logger>
<logger name="com.tridion.transport.transportpackage">
    <appender-ref ref="rollingDeployerLog"/>
</logger>
<logger name="com.tridion.transformer">
    <appender-ref ref="rollingDeployerLog"/>
</logger>
<logger name="com.tridion.deployer">
    <appender-ref ref="rollingDeployerLog"/>
</logger>
<logger name="com.tridion.tcdl">
    <appender-ref ref="rollingDeployerLog"/>
</logger>
<logger name="com.tridion.event">
    <appender-ref ref="rollingDeployerLog"/>
</logger>
<logger name="com.tridion.monitor">
    <appender-ref ref="rollingMonitorLog"/>
</logger>
<logger name="Tridion.ContentDelivery" level="${log.level}">
    <appender-ref ref="rollingCoreLog"/>
</logger>
<logger name="com.tridion.preview">
    <appender-ref ref="rollingSessionPreviewLog"/>
</logger>
<logger name="com.tridion.storage.persistence.session">
    <appender-ref ref="rollingSessionPreviewLog"/>
</logger>

<logger name="org.si4t.solr.SolrIndexer">
    <appender-ref ref="rollingSolrIndexerLog"/>
</logger>

<root level="OFF">
    <appender-ref ref="rollingCoreLog"/>
</root>

4) we configured the solr and the core is running and we are able to access the solr instance from the deployer.

Thanks again and let me know if you need more details.

  • Hi Anand, I will post configuration examples shortly. But beware! You are posting index messages to the Tridion search engine and this is definitely not supported or recommended. I hope you have a separate Solr instance running somewhere? – Raimond Jul 23 '13 at 19:48
  • we called the core name as tridion , we do have Solr instance running on the same server – Anand NS Jul 24 '13 at 3:27
  • Ok. I was confused as the port is also the same. – Raimond Jul 24 '13 at 6:31
  • Raimond we are working on it will update the post if we have any issues. Thanks again for your quick response. – Anand NS Jul 24 '13 at 12:34
0

@Raimond: SOLR running as separate port no, Tridion CMS search index is port no is different. In case CMS and Content Delivery running on same machine that case we are having different port number.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.