Skip to content

Instantly share code, notes, and snippets.

@Zodiac1978
Last active June 17, 2024 14:06
Show Gist options
  • Save Zodiac1978/f68836da22ea525cce4183faa6528c7c to your computer and use it in GitHub Desktop.
Save Zodiac1978/f68836da22ea525cce4183faa6528c7c to your computer and use it in GitHub Desktop.
Hello WCEU2024! You want more details about the internal, native search? Here are my thoughts and links ...

Hi, WCEU 2024 👋

My plugin for using REGEXP_REPLACE to optimize the search: https://wordpress.org/plugins/ignore-block-name-in-search/


Note

Please check your page builder if the native search still works!

My findings so far:

Working, but sharing the same issue about false positive results:

Enfold, Avada, PageLayer, Beaver Builder, Elementor, Brizy, Divi

Needs configuration:

  • Bricks ("Query Bricks data in search results" must be enabled)

Broken:

  • Breakdance (content is in a custom field called "breakdance_data" which is not searched by default)
  • Nimble (content is in another custom post type)

At least 20 strings are settings! https://gist.github.com/Zodiac1978/1d1bd363d5ba7d1ea68e3ffe352008f1

Stop words are part of translate.wordpress.org and not every locale has configured this correctly: https://en.wikipedia.org/wiki/Stop_word

50 times no stop words set, 9 times just copied EN stop words - and there are more https://make.wordpress.org/polyglots/2022/09/07/word-counting-type-setting-for-locales/


More plugins to optimize/replace the search


External solutions:


Related issues


Adding REGEXP_REPLACE to playground/sqlite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment