[TYPO3-Solr] Data imported with Solr Dataimporthandler not searchable through Search Form

thomas macaigne istreaming at gmail.com
Fri Apr 25 17:05:27 CEST 2014


So the appKey is the API key which can be found in the Backend under the Search section.
There are still abstract, rootline and access that I struggle to set so I used templates, but this can give you an idea on how to do it:


<dataConfig>

<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/DBNAME" user="root" password="PASSWORD" batchSize="1" />
    <document name="test">
    <entity name="pages" transformer="TemplateTransformer" query="select uid,pid,author,title as title,subtitle as subTitle, nav_title as navTitle, description from pages">
                <field column="siteHash" name="siteHash" template="d24e1cb126739e9ddd6f9072c487950bba023971" />
                <field column="site" name="site" template="http://mywebsite.domain.fr/" />
	        <field column="appKey" name="appKey" template="f329b64134351933fbaa916fc05fcbc0d88258d2" />
                <field column="url" name="url" template="index.php?id=${pages.uid}" />
		<field column="endtime" name="endtime" template="1970-01-01T01:00:00Z" />
                <entity name="tt_content" transformer="TemplateTransformer" query="select uid, CType as type,bodytext as content from tt_content WHERE pid='${pages.uid}'">
			<field column="id" name="id" template="d24e1cb126739e9ddd6f9072c487950bba023971/${pages.type}/${pages.uid}/0/0"/>  
              </entity>
     </entity>
    </document>
</dataConfig>

siteHash, appKey and site url have to be set manually.
Please also beware to set the mysql username, password and database name correctly.
Also, the id field is not computed correctly right now.

This is working, not finished but I hope it can help :)


More information about the TYPO3-project-solr mailing list