Configuring custom filters
How to hide a field from the custom filter builder
Add the Solr field name to
AppConfig.collectionQueryExcludeFields. This will also hide the field from the Query Builder.
Adding a new Solr field to the custom filter builder
When a new Solr field is added to the Solr schema, it will automatically get added to the
General, or default, category in the custom filter builder and it can be used with any filter type (free text, dropdown, year slider, etc). There are several places to configure the Solr field so that it works as intended:
QueryField.aliases(), add a human-readable alias for the field.
QueryField.descriptions(), add a short text description for the field.
- Add the field to the corresponding category in
- If this is a new Solr field
type, add the
typeto the array of the corresponding filter type in
QueryField.filterTypesMap(). If the new Solr field
typeis case-sensitive, add the
typeto the array in