ICT:D Taxonomy - Vocabulary - Terms use
Using Taxonomy for Keywords and Search in Drupal (Assets, Views, Entity Browser)
Purpose
This document describes how to use **taxonomy (vocabularies and terms)** in Drupal to:
- assign multiple keywords to entities (Assets, Persons, Objects, etc.)
- reuse keywords consistently
- enable effective searching via **Combined fields filters** in Views and Entity Browser modals
- scale to large datasets (1000+ entities)
No custom code is required.
---
Concepts (short definitions)
| Term | Meaning in Drupal |
|---|---|
| Taxonomy | The classification system |
| Vocabulary | A named set of related terms (e.g. "Keywords") |
| Term | One keyword inside a vocabulary |
A **vocabulary is part of taxonomy**, not a separate concept.
---
Creating a Keyword Vocabulary
1. Go to
Structure → Taxonomy → Add vocabulary
2. Example:
* Name: Keywords * Description: Free or controlled keywords for Assets and related entities
3. Save
You may create **multiple vocabularies** if needed, e.g.:
- Subject keywords
- Object type
- Period
- Location
- Technique / Material
---
Adding Keywords to an Entity Type
Repeat for each entity type that needs keywords (Asset, Person, Object, etc.).
1. Go to
Structure → Content types → Asset → Manage fields
2. Add a new field:
* Field type: Term reference * Reference type: Taxonomy term
3. Field settings:
* Allowed vocabulary: Keywords * Cardinality: Unlimited
4. Widget:
* Autocomplete (tags style)
5. Save
---
Keyword Usage by Editors
With autocomplete (tags style):
- Editors can **select existing keywords**
- Editors can **create new keywords on the fly** by typing and pressing Enter
- New terms are automatically added to the vocabulary
- Existing entities can be edited later to add or remove keywords
(Requires permission: Create terms in Keywords vocabulary.)
---
Using Keywords in Views (Search)
Basic rule
The **Combined fields filter** can search:
- any field that is present in the View’s Fields list
- even if the field is excluded from display
---
Configuring a View for Keyword Search
1. Edit the View (e.g. Entity Browser View) 2. Under Fields:
* Add the keyword field (term reference) * Enable Exclude from display
3. Repeat for any other searchable fields (title, identifier, description, etc.)
---
Adding the Combined Fields Filter
1. Under Filter criteria → Add 2. Choose:
* Global: Combine fields filter
3. Expose the filter 4. In filter settings:
* Select all searchable fields (including hidden keyword fields)
5. Save
---
How the Combined Fields Filter Works
- One search box
- OR logic across fields
- Example logic:
Title OR Identifier OR Keywords OR Description
There is:
- no AND syntax
- no multi-filter UI in Entity Browser modals
- only one exposed filter is shown
This is a known Entity Browser limitation.
---
Scaling to Large Datasets
For large collections (1000+ Assets):
- Rich keyword metadata is essential
- Multiple vocabularies are recommended
- Combined search enables progressive narrowing:
map 1850 Antwerp manuscript
This approach:
- avoids scrolling
- avoids complex UI
- remains performant
- requires no custom module
---
Recommended Pattern (Summary)
| Requirement | Solution |
|---|---|
| Multiple keywords per entity | Term reference field (unlimited) |
| Reusable keywords | Taxonomy vocabulary |
| Free keyword creation | Autocomplete (tags) |
| Narrowing search | Combined fields filter |
| Entity Browser modal | Single exposed combined filter |
| No custom code | Configuration only |
---
Notes for Maintainers
- Taxonomy vocabularies can be reused across entities
- Keyword structure can evolve over time
- Existing entities are not locked to initial keywords
- This setup intentionally avoids custom modules for maintainability
---