alleyinteractive / alleyinteractive/searchpress

Render Gutenberg markup before indexing

Ouverte
#118 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
PHP
Étoiles
85
Forks
10
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Currently, SearchPress indexes the raw contents of `post_content`, which historically wasn't much of an issue because the only thing that wasn't indexed was the rendered output of shortcodes. However, now that Gutenberg is becoming utilized more heavily, the fact that Gutenberg markup (comment tags, for example) are stored in the Elasticsearch index is problematic for a few reasons:

1. It bloats the index by adding data that doesn't need to be in there;
2. It interferes with the ability to do highlighting because the highlighting breaks *within* comment tags, which makes them break on render,
3. Any dynamically rendered blocks (that is, blocks that render via PHP rather than saving markup in `post_content`, which is the case for a lot of custom blocks) will not have their actual content saved in the index, and will therefore not be searchable.

I recommend that we run `the_content` against post content before sending it up to the index.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.