Using Solr With TYPO3 On Debian Squeeze - Page 2

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Tue, 2013-05-14 20:38. ::

3 Configuring TYPO3

Now we are going to configure Solr search for our TYPO3 Introduction Package web site on www.example.com:

One important note: make sure that www.example.com can be resolved correctly from server1.example.com and server2.example.com. If you use a test domain which cannot be resolved or resolves to a wrong host, you will not be able to set up Solr search successfully. In such a case, you can add a record for example.com and www.example.com to /etc/hosts on both server1.example.com and server2.example.com:

vi /etc/hosts

[...]
192.168.0.100 example.com www.example.com

Now in the TYPO3 backend, go to the Extension Manager and there to the Import Extensions tab:

Click on the Update Repository button right of the Repository drop-down to download a list of available extensions:

The list of available extensions is now being updated:

Afterwards, still on the Import Extensions tab, type solr into the Filter field and press ENTER. You should see the extension Apache Solr for TYPO3 in the list - click on the Import extensions icon in front of it:

A window should pop up telling you that the extension has been imported. Click on the Close window link to close it:

Now go to the Available Extensions tab. Find the Solr extension and click on the Install extensions icon in front of it:

A window should pop up. It is possible that a dependency is not fulfilled (e.g., the pagebrowse extension is needed by the Solr extension), so you might have to click on the Import now link to import the missing extension:

A new window will open telling you that the missing extension has been imported. Close that window:

Back on the Available Extensions tab, we need to enable the dependency first (in this case the pagebrowse extension), so find that extension and click on the Install extensions icon:

A new window will open telling you that the extension has been installed. Close that window:

After you have enabled all dependencies of the Solr extension, click on the Install extensions icon in front of the Solr extension:

A new window pops up telling you that database changes have to be made to enable the Solr extension. Accept all proposed changes and click on the Make updates button:

Afterwards you can close the window:

The Solr extension is now installed. Now we must configure our TYPO3 web site to use the Solr search.

Go to the List module and click on the root of your web site (in this case it is the page called Home) and select Edit from the menu:

Go to the Behaviour tab and make sure that the Use as Root Page checkbox is checked:

Next we must create a domain record for our web site. Still in the List module, click on the Create new record icon...

... and select Domain (under System Records):

Create the Domain record as follows (if you use example.com instead of www.example.com as the main domain of your web site, fill in example.com without www):

Now we must tell the Solr extension where it can find our Solr server. Go to the Template module, select extension_configuration (under TypoScript Templates) and select Info/Modify in the drop-down menu at the top. Then click on Edit the whole template record:

On the General tab, fill in the following Solr configuration in the Constants field:

plugin.tx_solr.solr.scheme = http
#plugin.tx_solr.solr.host = 192.168.0.101
plugin.tx_solr.solr.host = user1:secret@192.168.0.101
plugin.tx_solr.solr.port = 8080
plugin.tx_solr.solr.path = /solr/core_en

config.index_enable = 1

(Make sure you fill in the correct user and password in the plugin.tx_solr.solr.host line. If you don't use authentication, use plugin.tx_solr.solr.host = 192.168.0.101 instead.)

Go to the Includes tab and include the Apache Solr (solr) extension, then save the template:


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.