Opened 17 years ago
Closed 16 years ago
#5149 closed enhancement (duplicate)
Search everything (or almost everything)
Reported by: | ryan | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | search |
Focuses: | 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 (1)
Change History (7)
#2
@
17 years ago
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.
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):
For Backward compatibility a normal post_loop on a search results page would only display posts.