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.
Currently, RediPress strips all tags before storing the
post_contentfield 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.