Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Solr Configuration for Drupal

By editor , 13 December, 2016
Question

How to setup solr server for Drupal (Drupal 8 and Drupal 7) ?

Step 1. Install Tomcat And Solr Server (atlest 5.4.1)

Step 2. Install Solr Search API On your drupal

#Drush# drush en search_api_solr -y

Step 3. Copy solr core files

You have an example of "Solr configuration" files deleverd with drupal search_api_solr contrib module. on  search_api_solr/solr-conf/5.x. Copy this folder into the solr server core folder (Ex : /opt/solr-5.4.1/server/solr On our example) and rename it (Ex: 5.x -> new_core)

Step 4. Add this core to sorl system.

  • Go to http://127.0.0.1:8983/solr/ (Or your server path)
    • NOTE : If you use Jetty (as the example) server is at port 8983, and Tomcat uses 8080 by default.
  • Click on Core Admin -> Add Core ->Create New Core (Here core name is "new_core")
    • If you have an error like ".../data/elevate.xml not found", copy new_core/elevate.xml file into new_core/data/elevate.xml.

Step 5. Setup Solr on drupal

  • Goto /admin/config/search/search_api -> Add Server
  • Set basic data, (Name = solr_serveur ....)
  • Select Service class = Solr service
  • Configure Solr access
    • Solr path may like /solr or /solr/CORENAME. (Ex: /solr/new_core)
  • Create / Save Server.

Now you can view, edit, configure, index .... your solr from /admin/config/search/search_api/server/SOLR_SERVER_NAME (For the example : /admin/config/search/search_api/server/solr_serveur)

 

Tips : Few drush commands

Re Index contents
drush sapi-r;drush sapi-i

Tags

  • Drupal 8
  • Module
  • Drupal 7
Create an advances Search system for Drupal 8 with Search API.
Install Solr Search API
Install Solr 7 - Solr Search API

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer