# 🔍 Solr (6.1.0+) search Engine & Tika (1.13+) Extractor We are using solr for search index. Solr need to be configured for drupal. Follow the INSTALL.txt found in the `search_api_solr` module. As a pre-requisite for running your own Solr server, you'll need Java 6 or higher. # Installation Install all prerequisites and configuration from `web/modules/contrib/search_api_solr/INSTALL.txt` then Start Solr with: $ bin/solr start Create the new instance index-my-project $ bin/solr create -c index-my-project The creation will generate a folder under `$SOLR_PATH/6.1.0/server/solr/index-my-project` Copy all the configs files from `web/modules/contrib/search_api_solr/solr-conf/6.x/*` into `$SOLR_PATH/6.1.0/server/solr/index-my-project/conf` $ cp web/modules/contrib/search_api_solr/solr-conf/6.x/* $SOLR_PATH/6.1.0/server/solr/index-my-project/conf Restart Solr $ bin/solr restart Check your Solr status with `solr status` and with `http://localhost:8983/solr/#/` ## Usage Start Solr with: ```shell $ bin/solr start ``` Index all your content with: ```shell $ drush cron ``` Clean the index: ```shell $ drush sapi-c [index] ``` Index everything at once: ```shell $ drush sapi-i [index] ``` ## Drupal Configuration Check the Solr configuration on `admin/config/search/search-api/server/solr/edit` and the Tika under `admin/config/search/search_api_attachments` ### Add partial search By default Solr don't match partial search, you should edit the *schema.xml* file and add the following filters on the `fieldType name="text"`. ```xml ``` ```xml ``` ### Improved natural language search You should improved the natural search by editing the *stopwords.txt* file. Check stopwords on [stopwords-iso](https://github.com/stopwords-iso/) Replace the default `SnowballPorterFilterFactory` from `language="English"` to `language="French"`, You should improved the natural search by editing the *synonyms.txt* file. - Check synonyms for english (~1500 words) from [Roget's Thesaurus](http://www.gutenberg.org/ebooks/10681) - Check synonyms (~143405 words) for french from [termsuite](https://github.com/termsuite/termsuite-core/blob/master/src/main/resources/fr/univnantes/termsuite/resources/fr/french-synonyms.txt) - Check synonyms for french (~326 words) from [kevinbouge](https://sites.google.com/site/kevinbouge/synonyms-lists) ## Highlights http://www.codewrecks.com/blog/index.php/2013/05/27/hilight-matched-text-inside-documents-indexed-with-solr-plus-tika/