OkayWP has began work on a new plugin, OkayWP Search! It will be an adequate solution to improve search results on your WordPress website. Development is underway!
The standard WordPress search uses the LIKE
SQL operator to find search results in the posts table. This is problematic for multiple reasons. First, it’s not performant, especially on large websites with lots of posts. Second, the post content of a modern WordPress website has a lot of data that shouldn’t be included in a search. The block editor includes metadata about the blocks used in a post. Without parsing the content to remove the HTML, it can easily cause false positive search results.
The concept of OkayWP Search is to use the HTML_Tag_Processor to tokenize the HTML structure and index the results. This allows removing the content of HTML tags and attributes from the search results. It also provides the data required to use curtain HTML tags as metawords in the search index. By indexing the location of header and link tags, special ranking can assigned to the content of these tags.
Keep an eye out for updates on OkayWP Search on this blog!
About the feature image of this post: CC0 licensed photo by Nilo Velez from the WordPress Photo Directory.
Leave a Reply