Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#45414 closed enhancement (maybelater)

Improvement to the search widget

Reported by: superpoincare Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.8
Component: Query Keywords:
Focuses: Cc:


Consider a statement in a blog post such as:

Let there be light.

But if someone searches "let there be light" with quotes, the search won't return this result.

So the search widget needs to be improved to return this result.

Attachments (4)

Screenshot from 2018-11-26 13-35-28.png (28.5 KB) - added by rajanit2000 3 years ago.
Screenshot from 2018-11-26 14-43-33.png (5.9 KB) - added by rajanit2000 3 years ago.
I have tried that too @superpoincare
Screenshot from 2018-11-26 16-47-44.png (17.4 KB) - added by rajanit2000 3 years ago.
Sure check this attachment
Screenshot from 2018-11-26 16-50-33.png (25.4 KB) - added by rajanit2000 3 years ago.
If i add "." (dot) at the end on the word, It is not working

Download all attachments as: .zip

Change History (10)

#1 @rajanit2000
3 years ago

  • Keywords close added
  • Resolution set to invalid
  • Status changed from new to closed

@superpoincare please refer above screenshot. Its working for me.

#2 @superpoincare
3 years ago

  • Keywords close removed
  • Resolution invalid deleted
  • Status changed from closed to reopened

"light" is in italics in my ticket.

3 years ago

I have tried that too @superpoincare

#3 @superpoincare
3 years ago

Sure, your screenshot doesn't prove that it works.

3 years ago

Sure check this attachment

3 years ago

If i add "." (dot) at the end on the word, It is not working

#4 @superpoincare
3 years ago

None of what you say disproves my first comment.

Your screenshot "Screenshot from 2018-11-26 16-47-44.png" does not have "light" in italics.

Dot is irrelevant.

#5 @pento
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from reopened to closed

Thank you for the ticket, @superpoincare!

This is unlikely to be possible in WordPress core in the foreseeable future, as MySQL's search functionality doesn't support stripping out the HTML when finding search results.

If you require more accurate searching, I would advise trying out an Elasticsearch plugin.

#6 @SergeyBiryukov
3 years ago

  • Component changed from Widgets to Query

Changing the component, as the search is handled by WP_Query::parse_search(), not by the widget.

Note: See TracTickets for help on using tickets.