Search API Taxonomy Term
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
This module creates a new data alter callback that allows to filter nodes associated to target taxonomy terms during Solr indexing process. This filter is very useful when you have, for example, a single content type but you need to create multiple indexes that filter a subset of the nodes of that content type.
Requirements
This module adds a filter for SearchAPI Solr Indexs configured in your drupal site. Therefore it requires the following modules:
Installation
To install the module, use the canonical method:
- download the module, and uncompress it in the contrib modules folder of your website
- enable the module by going to admin/modules path
Configuration
Once the module is enabled you should be able to activate the new filter in the Filter tab inside any SearchAPI index you've already configured in your Drupal site. From this page you should be able to configure the Vocabularies whose terms you want to associate to the current index.
Now that the filter is configured, it won't affect the indexing yet: you'll have to enable the single terms of that vocabulary that you want to be used as filter. Editing each of the enabled vocabularies term, the user will be shown a new "Search API Taxonomy Term" fieldset that will allow her to associate the single term with the SearchAPI indexes that have enabled that vocabulary.
Also, for each enabled vocabulary, a new tab Indexes will be available (in admin/structure/taxonomy) that allows a more comfortable association of the terms to the Search API indexes.
A common use case
Here's an example of possibile use case of this module.
You have created an online music catalogue with Drupal.
There's a single content type: Album
The Album content type has a field term references field: genre referring to vocabulary with multiple terms: rock, pop, country, metal.
You want to create two sections using two different solr indexes: one for the album of the genre rock and one for the genre pop using as a filter two of the terms of the genre vocabulary.
