Making WordPress.org

#6569 closed enhancement (fixed)

Search is too permissive

Reported by: topher1kenobe's profile topher1kenobe Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Photo Directory Keywords:
Cc:

Description

If I search for "hand" I get a photo of a cHANDelier, which doesn't seem right.

Change History (3)

#1 @Otto42
22 months ago

Same for deli. All I wanted was some ham... https://wordpress.org/photos/?s=deli

Only allow partial matching at the start of a word, perhaps? Ideas?

#2 @dd32
22 months ago

Just noting that it appears the Photo directory is using standard WordPress search at present.

This is the pertinent search parts of the WHERE for the above deli example:

WHERE 
  (
    (
      (
        wp_posts.post_title LIKE '%deli%'
      ) 
      OR (
        wp_posts.post_excerpt LIKE '%deli%'
      ) 
      OR (
        wp_term_taxonomy.taxonomy = 'photo_tag' 
        AND wp_terms.name = 'deli'
      ) 
      OR (
        wp_posts.post_content LIKE '%deli%'
      )
    )
  ) 

#3 @coffee2code
22 months ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 12235:

Photo Directory, Search: Limit partial matching of search terms to at least being at the start of a matching term.

Fixes #6569.

Note: See TracTickets for help on using tickets.