#sitecore8.1
Explore tagged Tumblr posts
Text
Sitecore and Solr configuration
.li{ margin-bottom:10px; }
On this post I would like to detail a few important steps that you should follow when setting up Solr as the search engine for your Sitecore instance.
For this post I am using Sitecore 8.1 160302 (Update 2). The recommended Solr version is Solr 5.4.1, you can download it from here:Β http://archive.apache.org/dist/lucene/solr/
Install SOLR 5.4.1 to your local environment.
Copy the directory {installation location}\solr-5.4.1\server\solr\configsets\basic_configs to {installation location}\solr-5.4.1\server\solr\ and rename it sitecore_analytics_index.
Open up Sitecore CMS and navigate to the Control Panel.
Go to the link action "Generate the Solr Schema.xml file". Navigate to the schema.xml file under the directory you copied in the previous step. Replace the old schema file with the newly generated schema. The schema.xml file attached to this page already has all the needed fields, use that file if you want to skip this step and jump to step 7.
Open up the schema file and add the following field <fieldType name="pint" class="solr.TrieIntField"/>
The Sitecore schema generator may not include the dynamic fields for multiple languages needed for multi-site solution. Check to make sure you have the following fields in the schema.xml file. <dynamicField name="*_t_da" type="text_general" indexed="true" stored="true" /> <dynamicField name="*_t_de" type="text_general" indexed="true" stored="true" /> <dynamicField name="*_t_ja" type="text_general" indexed="true" stored="true" />
Add a file to the root of "sitecore_analytics_index" folder and name it core.properties "properties is the extension". Open up the file in a text editor and add the following on the first line, Β name=sitecore_analytics_index.
You will need a CORE for each index. Copy and paste the sitecore_analytics_index folder you created above for each of the indexes listed below. You will need to replace the text in the core.properties file for each of the cores with their name. In Sitecore 8.1, the following indexes are setup by default:
sitecore_analytics_index
sitecore_core_index
sitecore_fxm_master_index
sitecore_fxm_web_index
sitecore_list_index
sitecore_marketing_asset_index_master
sitecore_marketing_asset_index_web
sitecore_marketingdefinitions_master
sitecore_marketingdefinitions_web
sitecore_master_index
sitecore_suggested_test_index
sitecore_testing_index
sitecore_web_index
social_messages_master
social_messages_web
This is the file structure tree for a Sitecore core inside Solr
Once you have all the indexes/cores setup you have two options either run Solr from the command window or install it as a service. From a local development perspective I prefer to run it from the command window to avoid populating the services list with different Solr instances/versions.
To run it from the command window you can do the following:
To start it
Open a command prompt and navigate to the Solr bin folder {installation location}/bin
Type solr start
Top stop it:
Open a command prompt and navigate to the Solr bin folder {installation location}/bin
Type solr stop -p 8983 Note: I am assuming you are running Solr in the default port (8983)
This post was created by Carlos Araujo. You can contact me in twitter @caraujo
0 notes