Islandora CLAW installs the Apache Solr server (localhost:8983/solr) and the needed search related Drupal modules (Search API, Solr Search, Facets. The server setting can be found here: /admin/config/search/search-api/server/default_solr_server/edit
Islandora CLAW also creates a default search index: /admin/config/search/search-api/index/default_solr_index
You can configure the fields that need to be indexed here: /admin/config/search/search-api/index/default_solr_index/fields
. For example, the following steps can be followed to add Subject taxonomy term to the index.
- Go to
/admin/config/search/search-api/index/default_solr_index/fields
- Click Add fields. A popup with fields will be shown. Locate the Subject under Content. Expand the Subject taxonomy fields by clicking on the + button. Then click Add button besides the
Name (field_subject:entity:name)
field to add Subject taxonomy name field to the index. - Reindex by going to
/admin/config/search/search-api/index/default_solr_index
To show and create the above created field as a facet, see the following steps:
- Go to
/admin/config/search/facets
- Click the button Add facet.
admin/config/search/facets/add-facet
- Select the default solr index as facet source. And the subject field added above for field. You can modify the name to just Subject. Click to Save. It will take you to facet configuration page. Example:
/admin/config/search/facets/subject/edit
- Select the appropriate settings. For example check "Show the amount of results", "Sort by count"
- Go to the blocks layout
/admin/structure/block
. Search for the Subject facet block. Place in a position you need. - Go to the search view or page
/solr-search/content
. Click Search. You can will see the facet appear.