Skip to content

Bug: Suche sucht nicht mehr in Titel und Content #5

@eteubert

Description

@eteubert

Dein hook in die search query ist zu aggressiv. Es sollte zusätzlich in _shownotes gesucht werden, aber nicht ausschließlich.

Hier eine fehlerhafte SQL-Anfrage, wie sie aktuell generiert wird:

SELECT SQL_CALC_FOUND_ROWS wp_7_posts.id 
FROM   wp_7_posts 
       INNER JOIN wp_7_postmeta 
               ON ( wp_7_posts.id = wp_7_postmeta.post_id ) 
WHERE  1 = 1 
       AND wp_7_posts.post_type IN ( 'post', 'page', 'attachment', 'podcast' ) 
       AND ( wp_7_posts.post_status = 'publish' 
              OR wp_7_posts.post_status = 'private' ) 
       AND (( wp_7_postmeta.meta_key = '_shownotes' 
              AND Cast(wp_7_postmeta.meta_value AS CHAR) LIKE 
                  '%Microcontroller%' )) 
GROUP  BY wp_7_posts.id 
ORDER  BY wp_7_posts.post_date DESC 
LIMIT  0, 3 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions