Make WordPress Core

Opened 6 years ago

Closed 4 months ago

#41862 closed defect (bug) (invalid)

"Attach to Existing Content" popup search box pulling up records that don't match search query

Reported by: subrataemfluence's profile subrataemfluence Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.1
Component: Query Keywords: close
Focuses: administration Cc:


I am not very sure whether this is really a bug in WordPress core but today I encountered it accidentally.

I was Attach-ing an image from media library to an existing post. I typed in a search query (10 thing) in the search box and hit submit. Multiple records came up, while I was expecting only one which has the phrase in its title and content body. None of the other posts which appear along with, is associated with the search phrase. I checked title, body, and meta values for this post.

But when I searched with 10 things (added an "s"), I got the desired result, i.e. only a single post.

I have no third party plugin installed in my system. It is a clean install and everything is up to date.

Attachments (1)

search-result.jpg (40.5 KB) - added by subrataemfluence 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
6 years ago

  • Component changed from Posts, Post Types to Query
  • Keywords close added

It's likely that the found posts contain thing somewhere in content.

The search is supposed to return all the relevant results, not just strict matches, see #7394 for details. I don't see anything wrong here at a glance.

#2 @aubreypwd
6 years ago

Found that even though one of the posts had "thing" in the content, searching for "10 thing" did not yield the "This has the word th#ing in the content." I suspect it was actually the "10" keyword bringing up those other results.

#3 @JeffPaul
4 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

I concur with Sergey, it's likely that all those posts displayed had the text 10 and thing in them somewhere and that this worked as expected. As such, and given 5 years since last comment, I'm closing this as invalid.

Note: See TracTickets for help on using tickets.