[wp-trac] [WordPress Trac] #45606: WordPress search matches block editor comments and data (was: Gutenberg ruins Search Results)
WordPress Trac
noreply at wordpress.org
Fri Feb 1 21:23:01 UTC 2019
#45606: WordPress search matches block editor comments and data
--------------------------+-------------------------
Reporter: pat@… | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version:
Severity: normal | Resolution: maybelater
Keywords: | Focuses:
--------------------------+-------------------------
Changes (by desrosj):
* status: new => closed
* severity: critical => normal
* version: 5.0 =>
* milestone: Awaiting Review =>
* resolution: => maybelater
Comment:
Hey @patrelentlesstechnologycom, thanks for this ticket. I am going to
include some links to related issues on the Gutenberg GitHub repository
for context, and for anyone that stumbles on this ticket in the future.
[https://github.com/WordPress/gutenberg/issues/2718 GB-2718]
[https://github.com/WordPress/gutenberg/issues/3739 GB-3739]
[https://github.com/WordPress/gutenberg/issues/10247 GB-10247]
[https://github.com/WordPress/gutenberg/issues/10307 GB-10307]
Also, for prior history of how WordPress' search feature functions,
there's #7394. More specifically, [25632], which describes the current
priorities within the search logic of WordPress by default.
Unfortunately, this is not a new problem and is not being caused
specifically by the new block editor. Take shortcodes, for example. A post
with a `[gallery]` shortcode would be matched for a search query for
`gallery`. Likewise, a search for `table` would also match posts that
contain a `<table>` HTML tag. These have been included in `post_content`
for many years. MySQL's string searching is just not capable of parsing
and excluding certain patterns.
The block editor amplifies this issue because the occurrence of strings
like `paragraph` and 'image' are now far more common than shortcodes were
previously.
If your site requires more contextual searching, using something like
Elasticsearch will produce much more accurate search results. There are a
few plugins and services in the WordPress space that allow you to set this
up. Until a better means for searching content in MySQL is introduced, it
is unlikely that this is fixed in WordPress Core. I am going to close this
as `maybelater` in case that happens in the future so improvements to
search can be explored.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45606#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list