I have FulltextSearchable enabled in my config and a working site search. However, how do I exclude files in my assets folder (that are meant to only be viewable by logged in members) from appearing in search results?
In the FulltextSearchable API it warns:
CAUTION: Will make all files in your /assets folder searchable by file name
unless “File” is excluded from FulltextSearchable::enable().
That should remove all the files from the results as it’s only enabled for SiteTree class therefore removing the files altogether…
Edit: sorry that’s exactly what you’re saying. Ignore.
FYI, looking in the SearchForm class getResults function the results are filtered by the records canView() function so I’d start there by writing some member only logic in the canView().