-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WordPress search, unexpected results due to Gutenberg serialization markup #3739
Comments
Could #1422 be related? CC: @youknowriad |
@jasmussen I don't think so, this is a separate issue while searching uses the raw value of the post_content which includes the block comments and mess up with the results. But this is not specific to Gutenberg, Gutenberg makes it more visible but this is a Core Bug that can be reproduced using shortcodes as well. |
One new roadblock ? |
Unfortunately, this is a known issue in WordPress core - in a vanilla WordPress install, if you search for "table", you'll get results including If you require 100% accurate search results, the best option is to use a dedicated search engine, like Elasticsearch. There are also Elasticsearch services available within the WordPress world, if setting up a dedicated search server is not an option. |
Given Gutenberg blocks will add substantially more "hidden" strings, I wonder how much larger of a problem this will become. It'd be interesting to do some analysis comparing an English-language dictionary to partial string matches with Gutenberg blocks. |
I found a way to do this, but I'm not sure if fiddling with
@pento Feedback if a trac ticket makes sense would be very much appreciated. Thanks in advance! |
The code above is not working, but it seems there is a way for MariaDB 10.0.5+ and MySQL 8.0.4+, because then REGEXP_REPLACE was introduced. More details here: https://core.trac.wordpress.org/ticket/56294/ |
As already mentioned in a comment in #2718, a simple WordPress search for "paragraph" or "core" or "image" (if an image was added) shows unexpected results:
example.com/?s=paragraph
Gutenberg serialization markup leads to unexpected search results with above and many more keywords and keyword parts like para, graph, text, but, butt, button, cat, ate, categories, code, over, cover, form, head, ding, html, late, latest, post, list, quote, tor, table, ...
WP 4.9.1, Gutenberg Plugin 1.8.1
The text was updated successfully, but these errors were encountered: