INSTALL.txt 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Setting up Solr
  2. ---------------
  3. In order for this module to work, you will first need to set up a Solr server.
  4. For this, you can either purchase a server from a web Solr hosts or set up your
  5. own Solr server on your web server (if you have the necessary rights to do so).
  6. If you want to use a hosted solution, a number of companies are listed on the
  7. module's project page [1]. Otherwise, please follow the instructions below.
  8. A more detailed set of instructions is available at [2].
  9. [1] https://drupal.org/project/search_api_solr
  10. [2] https://drupal.org/node/1999310
  11. As a pre-requisite for running your own Solr server, you'll need Java 6 or
  12. higher.
  13. Download the latest version of Solr 4.x from [3] and unpack the archive
  14. somewhere outside of your web server's document tree.
  15. [3] http://www.apache.org/dyn/closer.cgi/lucene/solr/
  16. This module also supports Solr 1.4 and 3.x. For better performance and more
  17. features, 4.x should be used, though. 1.4 is discouraged altogether, as several
  18. features of the module don't work at all in 1.4.
  19. For small websites, using the example application, located in $SOLR/example/,
  20. usually suffices. In any case, you can use it for developing andd testing. The
  21. following instructions will assume you are using the example application,
  22. otherwise you should be able to substitute the corresponding paths.
  23. NOTE: The Solr 4.3+ example application is currently not completely supported
  24. with the configuration files included in this module, due to a slight change in
  25. directory structure. To fix this, simply copy, move or symlink the contrib/
  26. directory from the top level of the extracted Solr package one level down to
  27. example/.
  28. (For other directory structures: the contrib/ directory has to be in the
  29. directory two levels up from the one which includes the conf/ directory. For
  30. help, just start the Solr server and check the log files for WARN messages –
  31. they should state in which place Solr expects the directory to be.)
  32. CAUTION! For production sites, it is vital that you somehow prevent outside
  33. access to the Solr server. Otherwise, attackers could read, corrupt or delete
  34. all your indexed data. Using the example server WON'T prevent this by default.
  35. If it is available, the probably easiest way of preventing this is to disable
  36. outside access to the ports used by Solr through your server's network
  37. configuration or through the use of a firewall.
  38. Other options include adding basic HTTP authentication or renaming the solr/
  39. directory to a random string of characters and using that as the path.
  40. Before starting the Solr server you will have to make sure it uses the proper
  41. configuration files. These are located in the solr-conf/ directory in this
  42. module, in a sub-directory according to the Solr version you are using. Copy all
  43. the files from that directory into Solr's configuration directory
  44. ($SOLR/example/solr/collection1/conf/ in case of the 4.x example application),
  45. after backing up all files that would be overwritten.
  46. NOTE: The mapping-ISOLatin1Accent.txt is only included in the module for
  47. completeness' sake, as it is required to start the Solr server. It will be
  48. usually advisable to just use the file of the example application in this case,
  49. though, as it contains really useful definitions, while the file provided with
  50. this module is empty, apart from some documentation. For licensing reasons, it
  51. is not possible for us to include the definitions in the example config file in
  52. the copy this module provides.
  53. You can then start Solr. For the example application, go to $SOLR/example/ and
  54. issue the following command (assuming Java is correctly installed):
  55. java -jar start.jar &
  56. Afterwards, go to [4] in your web browser to ensure Solr is running correctly.
  57. [4] http://localhost:8983/solr/#/
  58. You can then enable this module and create a new server, using the "Solr search"
  59. service class. Enter the hostname, port and path corresponding to your Solr
  60. server in the appropriate fields. The default values already correspond to the
  61. example application, so you won't have to change the values if you use that.
  62. If you are using HTTP Authentication to protect your Solr server you also have
  63. to provide the appropriate user and password here.