Does anybody have a hint how to get two different searches on a Drupal 8.8 site?
This means, if a guest uses the search, only pages of type page and article should be listed in the result. If an authenticated user uses the search, all pages of any type should be listed in the result.
In the module description of search_api can be read:
In general, the Search API doesn't provide any kind of access restrictions (as this cannot be done on a generic level). It is therefore your responsibility to take care that only accessible items are indexed or results displayed (e.g., by using appropriate filters).
I understand this in a way that content can be excluded while indexing but not when presented.