Handling archiveless
posts in Elasticsearch queries
#62
Labels
elasticsearch
Requires understanding Elasticsearch
enhancement
New feature or request
php
Requires understanding PHP
Description
This is a similar problem with #61. The only difference is that Elasticsearch performs the request.
I noticed that by toggling the "Hide from Archives" button, the post is completely removed from Elasticsearch. Not only hidden but literally gone.
That means one can index post types with support for the plugin but need to search (with Elasticsearch) it is impossible.
In other Alley projects (see alleyinteractive/byline-manager#120), that's been talks about handling it in the culprit plugin rather than leaving to consumers to resolve.
I was able to track the source of the issue to this line. That's then used here. That's being affected by these loc:
archiveless/inc/class-archiveless.php
Lines 189 to 223 in bd86603
Use Case
This bug recently affected a client site. The client has a post type where they can't search the parent post in the Page Attributes slotfill because the archived parent doesn't appear in the results list (since it is removed from Elasticsearch).
The client uses VIP Search. But we should consider other plugins, like SearchPress, in the solution.
The text was updated successfully, but these errors were encountered: