Skip to content

Dynamic Gutenberg blocks are not included in search #70

@villesiltala

Description

@villesiltala

Currently, RediPress strips all tags before storing the post_content field with RediSearch. This also strips all HTML comment tags which leads to dynamic block content not being queryable for searches. This is problematic, especially for ACF blocks. They store data as JSON in the HTML comment. Still, not all dynamic block content is wanted for searches. For instance, blocks rendering link lists for posts might not add relevant data.

A solution for this could be to first parse blocks from the content field. Then run them through a filter defining all blocks to be allowed in search. After filtering the final list, blocks could be run through rendering to get the actual content. This would enable developers to define exactly which blocks are needed for searches and which not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions