Solr Setup with Search API Drupal Module - pulibrary/pul_library_drupal GitHub Wiki
- Download Most Recent Solr
- Unpack to a directory on the local machine
- Cd to {solr_install}/example/solr
- Edit to solr.xml to have a core that can hold indexes for the site to look something like this. Right now the name of the index for the core site is sapilibrary-stage with configs for it living in the subdirectory sapilibrary_stage in {solr_install}/example/solr
<solr persistent="false">
<!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via request handler
-->
<cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}">
<core name="core0" instanceDir="core0" />
<core name="core1" instanceDir="core1" />
<core name="sapilibrary_stage" instanceDir="sapilibrary-stage" />
</cores>
</solr>
- Search API module consists of various submodules. You will find the current recommended solr conf in the "search_api_solr" module directory. Change to {DRUPAL_ROOT}/sites/all/modules/search_api_solr/solr-conf/4.x.
- Copy all files in that directory to {solr_install}/example/solr/sapilibrary-stage/conf/
FYI: The {solr_install} directory on PUL servers is typically /opt/solr/
.
To restart Solr, all that is needed is: sudo service jetty start
- cd {DRUPAL_ROOT}
- run
drush sapi-s
you should see something like:
Id Index % Complete Indexed Total
10 Best Database Bet 99.1% 5460 5508
11 Database Keyword Index 99.1% 5460 5508
12 Database Subject Index 93.1% 2879 3091
13 Databases URI 99.1% 5460 5508
14 Default node index 99.1% 5460 5508
15 Database Administrative Index 99.1% 5460 5508
16 Libraries and Collections 99.1% 5460 5508
17 Staff User Index 99.6% 500 502
- Rebuild Indexes. Run
drush sapi-c
to clear all Indexes - Now Rebuild them. Run
drush sapi-i {index_id_number}
for each index. - Check Search API Configuration to see how they are defined. See http://{my-local-site}/admin/config/search/search_api