Last tested: Aug 21, 2020
Filter suggestions are a way to save time when typing into filters and ensure you're choosing an option that exists in the data. When you click into a filter box, a list of suggestions will appear below the field.
Looker will run a query against the database to get all possible options for that field. It will look something like this:
SELECT DISTINCT <field_name>
FROM <table>
WHERE (<field_name> LIKE '%' OR <field_name> LIKE '% %')
GROUP BY 1
ORDER BY 1
LIMIT 1000
If the user types some characters into the filter box, Looker will substitute the appropriate conditions into the WHERE clause to filter the results. Looker will then show the first 100 of those results.
Yes! Check out this docs article.
Yes, they are! The cache length for filter suggestions is determined by the suggest_persist_for LookML parameter, which has a default value of "6 hours".
sql_trigger
, then the filter suggestion cache will be busted along with the regular explore cache when the trigger value changes. Therefore, datagroups are recommended for simplifying suggestion caching. max_cache_age
will not affect filter suggestions, however—suggest_persist_for
will take precedence over it.We have a whole article on that!
This content is subject to limited support.
can the list of suggestions query be edited? for example remove the LIMIT 1000