Skip to content

allow lambda for include_in_request argument in add_facet_field #3873

@ebenenglish

Description

@ebenenglish

In the CatalogController configure_blacklight block
When I am adding a facet field using the config.add_facet_field helper
I should be able to pass a lambda as a value to the include_in_request argument
So I can conditionally add facet fields to the request based on values in context.params, etc.

Discussion:
Blacklight already supports passing a lambda to the if argument to allow for additional logic when displaying the facet in the catalog#index view.

It would be helpful to be able to use this pattern for the include_in_request argument, which would allow limiting the facets on any given request to only those needed, avoiding potentially expensive queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions