Home / Simple guide to install Apache Solr 3.x for Drupal 7

Simple guide to install Apache Solr 3.x for Drupal 7

A quick and simple guide to get Drupal 7 and Apache Solr version 3.5 or higher running on your local development machine! For the ones that have been resistant in trying out Apache Solr, this is your chance. If you are running an OSX or Unix machine you could be running Apache Solr in under 5 minutes!
Follow these simple steps and you will become a Solr Master very soon!
This guide has been made for unix and mac users. Windows users can probably use the same guide except for the example folders. If you are using Search API most of these steps are applicable to that project as well.

  1. Download the Apache Solr 7.x-1.1 module from the Apachesolr module and place it in your drupal folder for contributed modules. Typically this is sites/all/contrib
  2. Enable ApacheSolr and ApacheSolr Search modules in admin/build/modules

  3. Download Apache Solr from a mirror near you : http://www.apache.org/dyn/closer.cgi/lucene/solr/3.5.0
  4. Unpack it somewhere outside your drupal installation and outside your web root/folder. Suggestion would be ~/Servers/apache-solr-3.5
  5. Go to sites/all/contrib/apachesolr/solr-conf and copy all files to ~/Servers/apache-solr-3.5/example/solr/conf
  6. In ~/Servers/apache-solr-3.5/example/solr/conf you can remove schema.xml and rename schema-solr3x.xml to schema.xml. Do the same for solrconfig.xml
  7. Open your command prompt and do cd ~/Servers/apache-solr-3.5/example
  8. Type the following command to start the Apache Solr service
    java -jar start.jar
    If all went well your Solr Server is running now! Congratulations!
  9. Test your solr server admin interface by visiting http://localhost:8983/solr/admin
  10. Go to admin/config/search/apachesolr/settings and click on edit. Verify if the url http://localhost:8983/solr/ is correctly entered and click ok
  11. Optional : Facets

    If you want Facets you should download Facet API and enable it. When this is done you can go to admin/config/search/apachesolr/facets and enable the facets you'd want

  12. Optional : Security

    Careful because Solr comes unprotected. If you'd like to run Solr in a more permanent basis I would recommend to run it on Tomcat as described in my other guide http://www.nickveenhof.be/blog/setting-drupal-6-apache-solr-tomcat-6-and... and put an IP-filter in front of it.

  13. Optional : Multicore

    if you want to run multicore you can type
    java -Dsolr.solr.home=multicore -jar start.jar
    Attention: All your files should be in multicore/core0/conf

Source original pdf : http://drupal.org/node/1332144

Reacties

Posted on by Travis Johnston.

Thanks for the instructions. I was able to follow along until I ran the jar command and it got stuck on Started SocketConnector@0.0.0.0:8983

I am also using Acquia Dev Desktop which i'm not sure if that makes the port different or anything. I went to the settings page to test the connection but it can't reach the Solr server.

Posted on by Mika Andrianarijaona.

I used a lighter version of SOLR that I have found in Drupal website : https://drupal.org/documentation/modules/search/quick-start-solr-3

Posted on by Charles Dominic.

Thank for your precious tutorial. I can run solr now. I have three problem in my logging.

[collection1] Solr index directory 'server\solr-4.6.0\example\solr\collection1\data\index' doesn't exist. Creating new index...

Solr loaded a deprecated plugin/analysis class [solr.JsonUpdateRequestHandler]. Please consult documentation how to replace it accordingly.

Solr loaded a deprecated plugin/analysis class [solr.CSVRequestHandler]. Please consult documentation how to replace it accordingly.

Can these effect?

Reactie toevoegen

Plain text

  • Geen HTML toegestaan.
  • Adressen van webpagina's en e-mailadressen worden automatisch naar links omgezet.
  • Regels en alinea's worden automatisch gesplitst.

Filtered HTML

  • Use [acphone_sales], [acphone_sales_text], [acphone_support], [acphone_international], [acphone_devcloud], [acphone_extra1] and [acphone_extra2] as placeholders for Acquia phone numbers. Add class "acquia-phones-link" to wrapper element to make number a link.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Adressen van webpagina's en e-mailadressen worden automatisch naar links omgezet.
  • Toegelaten HTML-tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <h4> <h5> <h2> <img>
  • Regels en alinea's worden automatisch gesplitst.
Bij het indienen van dit fomulier gaat u akkoord met het privacybeleid van Mollom.