summaryrefslogtreecommitdiffstats
path: root/docs/SOLR.txt
blob: 05ff1bd893ce8dc7fe36212a97758959152d8294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 To enable Apache Solr Search feature for any site on your BOA server,
 please download and enable either Apache Solr Search Integration
 module with required third party library, as explained in its readme,
 or download and enable Search API Solr search module (D7 only).

 https://drupal.org/project/apachesolr (6.x-1.7 or newer)
 https://drupal.org/project/search_api_solr (7.x-1.0-rc3 or newer)

 BOA system supports both Apache Solr Search Integration module
 and Search API Solr search module (used by default), and you have
 a few options to use it with different versions of Apache Solr
 and Jetty server, for maximum backward and future compatibility.

 By default, all pre-configured Solr Cores come with required
 solrconfig.xml, schema.xml and protwords.txt files compatible
 with Solr 3.x config series from Search API Solr search module
 for Solr 3.x and Solr 4.x, or Solr 1.x config series for Solr 1.x

 You may want to replace them if you wish to use Solr with Drupal 6
 sites, which require Apache Solr Search Integration module instead.

 You should configure each core separately to use correct version
 by uploading respective solrconfig.xml, schema.xml and protwords.txt
 files to the solr{1,3,4}/core*/conf directory and restarting correct
 Jetty instance with command `service jetty{7,8,9} restart`.

 NOTE: If your site was already configured to use any of those
       modules, you must delete its search index (not just rebuild it)
       or the site and the search indexing will fail to work properly.

 In your Solr configuration there are ready to use 10 separate
 cores, since you need to use one core per site to avoid
 displaying search results from different sites on any site
 with enabled Solr module.

 The access credentials you should use are as follows:

 Solr host ........: 127.0.0.1

 Solr port ........: 8077 (for Solr 1.x with Jetty 7)
 Solr port ........: 8088 (for Solr 3.x with Jetty 8)
 Solr port ........: 8099 (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy)
 Solr port ........: 8080 (for Solr 1.x with Jetty 7 migrated from Tomcat)

 Solr path ........: solr/core0 (configured in solr.xml)
 Solr path ........: solr/core1 (configured in solr.xml)

 Solr path ........: solr/core2 (not configured in solr.xml)
 Solr path ........: solr/core3 (not configured in solr.xml)
 Solr path ........: solr/core4 (not configured in solr.xml)
 Solr path ........: solr/core5 (not configured in solr.xml)
 Solr path ........: solr/core6 (not configured in solr.xml)
 Solr path ........: solr/core7 (not configured in solr.xml)
 Solr path ........: solr/core8 (not configured in solr.xml)
 Solr path ........: solr/core9 (not configured in solr.xml)

 To add more cores, you need to:

 1. Create a copy of example core directory:
    cp -ar /opt/solr3/core0 /opt/solr3/core11

 2. Add this new core in the solr.xml file:
    /opt/solr1/solr.xml (for Solr 1.x with Jetty 7)
    /opt/solr3/solr.xml (for Solr 3.x with Jetty 8)
    /opt/solr4/solr.xml (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy)

 3. Restart correct Jetty instance:
    service jetty7 restart (for Solr 1.x with Jetty 7)
    service jetty8 restart (for Solr 3.x with Jetty 8)
    service jetty9 restart (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy)

 You can also rename the "core name" in the file:
   /opt/solr{1,3,4}/solr.xml
 to avoid using them by not authorized sites owners:

   <cores adminPath="/admin/cores">
     <core name="325o45758" instanceDir="core0" />
     <core name="w44337377" instanceDir="core1" />
   </cores>

 To install one or more supported versions of Apache Solr
 with corresponding Jetty version, just add correct
 keyword to the _XTRAS_LIST in /root/.barracuda.cnf

 SR1 (for Solr 1.x with Jetty 7)
 SR3 (for Solr 3.x with Jetty 8)
 SR4 (for Solr 4.x with Jetty 8 or 9 on Precise/Wheezy)

 It is even possible to add them *all* on upgrade when
 you are already running now deprecated Tomcat 6 with Solr 1.x,
 because new, Jetty based Solr instances use separate
 ports and directories.

 TOMCAT TO JETTY MIGRATION NOTE:

 To migrate existing Solr cores from Tomcat 6 to Jetty 7,
 add special variable _TOMCAT_TO_JETTY=YES in your config file
 /root/.barracuda.cnf and run barracuda up-{stable,head} upgrade.

 It will migrate all cores as-is, so they will be available
 on the same port 8080 previously used by Tomcat. It will also
 automatically install Jetty 7 with Solr 1.4.1 for you,
 even if you forgot to add required SR1 in the _XTRAS_LIST.