Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Jetpack (Instant) Search: show private posts if user is logged in #18834

Open mrfoxtalbot opened 3 years ago

mrfoxtalbot commented 3 years ago

Steps to reproduce the issue

  1. Set up a public site with both private and public posts
  2. Do a search looking for a private post
  3. Private posts will not show on search results

What I expected

The default WordPress search page will show private posts to logged users. I expected Instant Search to do the same and also show private posts.

For context, I have private and public posts mixed on several of my sites and not having access to my private posts by searching for them makes Instante Search less useful than the default search.

What happened instead

Private posts are not listed in Instant Search results.

This is compounded by the fact that Instant Search takes over the default search URL making it impossible to look for posts from the public site using any other method unless it is deactivated completely

mrfoxtalbot commented 2 years ago

Thank you for triaging this, @bluefuton. I have noticed you replaced the "Bug" label with "Enhancement". Each feature and each repo is different but I would argue this is a bug in the sense that it does not match the expectation of how the default WP search works, where private posts WILL be visible to logged in users in search results.

An example can be found below: https://gutenbergcore.mystagingwebsite.com/?s=private

If I am logged in, the default search will show private posts: Screen Shot on 2022-09-01 at 10:35:50

IMHO, if Jetpack Search aims to provide a better searching experience, it should at the very least replicate the basic features of the default WP search.

What do you think?