Source Analyzer

The Source Analyzer is a script executed when you visit the FiboFilters settings page. It analyzes filter sources to determine the most relevant facet types (e.g., Checkboxes, Radio, Number) for each filter. This ensures that only appropriate options are displayed, simplifying filter setup.

For example, if all values for a given filter are strings, the Range type will not be available under “Facet type,” as it is not applicable.

Performance optimization

To enhance performance, the script does not run every time the settings page is accessed. Instead, the results are stored in a transient for one hour, reducing redundant computations and improving load times. The transient is called fibofilters_sources_analyse_data.

Troubleshooting

No access to Filter Builder

In cases where the dataset is large, the analysis process may take a significant amount of time, potentially causing issues when accessing the settings page and making the Filter Builder inaccessible:

FiboFilters Source Analyzer

If this becomes problematic, the Source Analyzer can be disabled using the following code snippet:

add_filter( 'fibofilters/analyse_source_value_types', '__return_false' );

Learn how to add this snippet to your WordPress.

Disabling the Source Analyzer will cause FiboFilters to display default facet types for the filters.

Facet type not available for a filter

FiboFilters caches applicable facet types in the fibofilters_sources_analyse_data transient for one hour. As a result, certain facet types may not appear in the list if the cached data is outdated. To resolve this issue, you can manually delete the transient. There are two ways to do this:

With WP-CLI:

wp transient delete fibofilters_sources_analyse_data

With PHP:

delete_transient( 'fibofilters_sources_analyse_data' )