Using Solr With TYPO3 On Debian Wheezy - Page 3
On this page
Now log out...
... and log back in. In the Clear Caches menu in the upper right corner, you should now find the option Initialize Solr connections - click on that option:
Now go to the Reports module and select Apache Solr Index:
If no errors are reported, this means that the Solr server has successfully been contacted (of course, no documents have been indexed yet, that's why you see 0 for all items). If the Solr server cannot be contacted, you will see a Failed to connect... error message - in this case you should install the devlog extension to find out what went wrong.
Go to the Search module next, select pages and click on the Initialize Index Queue button:
Next we must set up two scheduled tasks, one that creates the index of your TYPO3 page and one that commits the Solr index. In the Scheduler module, click on the Add task icon:
For the first scheduled task, select Index Queue Worker (solr) in the Class field, Recurring in the Type field, specify a start time, leave the End field empty, specify a frequency (like 3600 for one hour), select your root page in the Site field and save the scheduled task:
For the second scheduled task, select Commit Solr Index (solr) in the Class field, Recurring in the Type field, specify a start time, leave the End field empty, specify a frequency (like 3600 for one hour), select your root page in the Site field and save the scheduled task:
Afterwards, in the Scheduler module, select both scheduled tasks and click on the Execute selected tasks button to run them right now:
If you visit your Solr server in your browser now and type in *:* in the Query String field,...
... Solr should show you a list of results in XML format which means your TYPO3 page has successfully been indexed:
Back in the TYPO3 backend, we create a search page now so that we can use the Solr search from our TYPO3 web site. Go to the Page module and click on the Create new pages icon:
Drag and drop the Standard icon...
... to the place in your tree structure where you want the search page to be located (e.g. after the Feedback page):
Click on the icon in fron of the new page and select Edit from the menu:
Fill in a title for the new page (like Search) and save the page:
Afterwards, enable the page:
Then click on the Create new content element icon:
Go to the Form elements tab and select Search Form; then specify a position for that element:
Save the document afterwards:
You can now reload your TYPO3 web site - you should now see a new menu item called Search. Go there an fill in a search term in the search form and submit the form:
If your search term is in the Solr index, you should get a list of results in virtually no time:
Congratulations, you have just set up Solr search for your TYPO3 web site!