10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.24k stars 312 forks source link

Continued Indexing Issue #3955

Closed gwhitehead closed 1 month ago

gwhitehead commented 1 month ago

Describe the bug

Looks like my old bug got stale and closed completely instead of allowing me to open it back up again. I see one other person has had an issue with categories and tags not being indexed for posts. The system wasn't sending the categories in with the initial save so that Elasticpress could index those categories for returned results. I did a CLI sync and it then indexed the categories for the post post_type and started showing the respective results on the category archive page.

Now the continuation of my issue. There are times that Custom Post Types are not indexed even though published. There is times that we run into a post that has been published, its post type is set to be indexed via Elasticpress. An appropriate weight has been set for the items within the post. Yet the item is not indexed on the initial publishing of said item. We are not able to truly track down what is causing this item to not be listed in the search results or in the auto-suggest.

Most of the time, resaving the item allows it to then start showing up in the autosuggest and also search results. But we do not know that an item is missing until usually someone is doing a search for a specific product and at that time we realize it is not in the system. @felipeelia suggest of indexing a specific post ID would probably reindex the item via the WP CLI but we don't know something is needing to be reindexed until we try to search for a published item.

Is there a way that we can have a reporting page and/or system that shows us items that should be showing in search results that are not actually in the Elasticpress DB? Or is there functionality in the system that can allow me to query the Elasticpress for index status based on ID?

Doing a command line sync usually resolves the issue but we don't know there is an issue without either doing a lot of testing to find a missing resource or the client notices the results are not showing.

Steps to Reproduce

We find that results are not search results page or autosuggest. Either resave item or a cli sync brings item back into system.

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

felipeelia commented 1 month ago

Closing in favor of #3938