WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

Last modified 4 years ago

#1176 closed defect (bug) (wontfix)

search query bug

Reported by: Denis de Bernardy Owned by:
Milestone: Priority: normal
Severity: minor Version: 1.5.1
Component: General Keywords:
Focuses: Cc:

Description

I was working on the wordpress search query, when i bumped into this amusing bug:

e.g. with the following text:

[some text][markdown url id]

[markdown url id]: /some_page/

You get the following false positives:

$s = 'markdown url id'
$s = 'some_page'

i submitted the bug to michel fortin already.

Change History (3)

comment:1 Denis de Bernardy9 years ago

  • Patch set to No

comment:2 Denis de Bernardy9 years ago

On second inspection, it has more to do with WordPress than with Markdown.

The following bug is more interesting:

http://www.semiologic.com/?s=1

WordPress searches in tags, links, etc. whereas it would be more relevant to search in a plain text, cleaned up version of the text.

Suggested workaround 1:

  • apply-filters to text upon saving
  • store in new field wp_posts.search_text
  • conduct searches in search_text rather than in post_content

side effects:

  • this requires reindexing from time to time when plugins are installed or removed -- are there any on_plugin_enable and on_plugin_disable handles?

Suggestion workaround 2:

  • apply filters to search result contents to verify its relevance

side effects:

  • very slow

comment:3 rob1n7 years ago

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.