[wp-hackers] Page searching examples [was: 2.4 planning discussion]

Otto otto at ottodestruct.com
Sat Sep 29 15:06:38 GMT 2007


Generally, if your Page does anything particularly special, then it's
using a special Template, one would hope.

So, one approach might be to make Pages that are using custom Page
Templates to be excluded from the search results. Normal Pages that
just have content in normal template structure would then show up just
like Posts do.

While I don't necessarily agree with putting Pages in the search, I
can see why some people would think it would search Pages. However, I
do think that the search should absolutely search for matching Tags.
Tags are basically self-made keywords, not using them for search is
crazy.



On 9/29/07, Ryan Boren <ryan at boren.nu> wrote:
> On 9/27/07, Daniel Cameron <dan at scatter3d.com> wrote:
> > I've been waiting for this conversation since I started following the list.
> >
> > > "see what people expect"
> >
> > The majority of people expect for pages to show up in their results and a
> > large majority of them want more options. My original release for SE was
> > very basic, option to include pages and an option to include comments. I
> > never liked searching comments (since the queries would take too long) but I
> > added it because that's what people wanted. Now, I'm not advocating that we
> > "bloat" the core with a ton of options but if we were to allow for searching
> > of pages it should be an option. And if it's an option we might as well add
> > some more functionality/options to give the masses what they want or at
> > least fill up the new search options page :) .
> >
> > > see what plugins are doing
> >
> > Currently SE has category exclusion, post and page id exclusion and the
> > searching of excerpts, comments, excerpts, drafts, attachments, meta data
> > (this is huge for a lot of users) and tags (broken in 2.3). All of these
> > options, except tags and drafts, have been strongly expressed by the
> > community as "necessary" options, especially those who use Wordpress as a
> > CMS for development.
>
> Pages should definitely be in search.  There are back-compat problems
> with mixing pages and posts in the search results, however, which is
> what most if not all search plugins do.  Some themes display the
> entire post content in searches.  Pages with forms and other stuff in
> them will make search results look screwy.  I think we'll need to add
> a means for themes to signal they are compatible with mixed search
> results.  Perhaps something like set_theme_capability('full_search',
> true) that can be called from the theme's functions.php.  If the
> capability is not true, we either exclude non-posts from the search
> results or filter the content of non-posts in the results.
>
> As for what all should be searched by default, posts and pages are
> definitely in.  Perhaps comments and meta too.  Sites with a huge
> number of comments could get bogged down, however.  I think  a good
> starting point for a patch in core would include posts and pages and
> make it easy to plug other things in.
>
> Ryan
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list