Ticket #5149 (new enhancement)

Opened 9 months ago

Last modified 4 months ago

Search everything (or almost everything)

Reported by: ryan Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: General Version: 2.3
Severity: normal Keywords: search
Cc:

Description

Extend search to include pages and other things. The more comprehensive the better, limited only by performance considerations. Care will need to be taken when including pages in the search results since themes that display full post content may break. Putting a filter that strips tags from page content returned in search results would suffice. The search should be as hookable as possible to allow customization via plugin.

Possible things to search on:

  • Post title, content, excerpt, author, tags, categories
  • Page title, content, excerpt, author, tags, categories
  • Comment content, author
  • Post/page meta fields

Features that would be nice to have:

  • Order search by relevance
  • Excerpt relevant areas of content, search engine style

Relevant discussions:

Attachments

search_pages.diff (1.8 kB) - added by ryan on 10/10/07 17:44:55.

Change History

10/06/07 06:11:57 changed by westi

Should we not introduce a new search loop with search result specific template tags and then the related in memory storage of search results is just a collection of objects|arrays that each represent a search result.

These could have the following properties (all exposed as new template tags):

  • Content / Excerpt
  • Title
  • Type of content: Post|Page|Comment etc.
  • ...

For Backward compatibility a normal post_loop on a search results page would only display posts.

10/10/07 17:43:17 changed by ryan

We'd have to run two searches then, which seems a waste. I'd like to keep it at one search query.

As for comments, should we directly include them in the search results or just the posts they are associated with?

Anyhow, here's a quick patch that extends search to pages. There's no backward-compat filtering done on them yet.

10/10/07 17:44:55 changed by ryan

  • attachment search_pages.diff added.

12/22/07 08:19:10 changed by ryan

(In [6467]) Throw pages into search queries. Let's see how they handle. see #5149

12/31/07 02:22:21 changed by DD32

Also: #1435 - Pages should be searched: "Include 'static' pages in search results"

03/19/08 22:44:39 changed by ffemtcj

  • milestone changed from 2.5 to 2.6.