PSQL offers a handy \dv
function for showing the definition of a view. That function does not seem to work on materialized views.
To see the definition of a materialized view use the following instead:
select pg_get_viewdef('search_documents');
Another option is to use \d+ search_documents
which shows both the query and the columns.
(Replace search_documents
with the name of your view.)