[MTOS-dev] Supporting public/private search (was Implementing new MT::App::Search)

Jay Allen jay at endevver.com
Sat Mar 1 16:17:55 PST 2008


[Changed subject to better reflect this part of the discussion)

On Sat, Mar 1, 2008 at 12:28 PM, Mark Carey <mark at mt-hacks.com> wrote:
> On Sat, Mar 1, 2008 at 3:56 PM, Jay Allen <jay at endevver.com> wrote:
>  >  So you would be doing a search against all blogs and after returning
>  >  some potentially huge result set, you're *then* going to filter it
>  >  down?  Eek.
>
>  Where did I say that, Jay?  ;)

You didn't but by using the tag mt:SearchResults it did seem to imply
that your filtering was on results and not on query.

>  I didn't suggest that at all.  In my example these args would be read
>  before the query is submitted.  The code would determine based on the
>  value of the args, what to submit in the query.  In other words, you
>  would search only the desired blogs.  Like most MT template tags, the
>  args and context would assessed before the query is formulated.

Then, I don't think that what you suggest and what I suggest is all
that different.  However, I'm doing it within a query param:

 <form>
   <input type="text" name="search" />
   <input type="hidden" name="search-key" value="<MTSearchKey
include_blogs="1,2,3">"  />
  </form>

whereas, correct me if I'm wrong, you're suggesting enclosing the
entire form (and search results?) in a multiblog enabled tag:

   <MTSearchContext include_blogs="1,2,3">

      <form>
          <input type="text" name="search" />
      </form>
      [results...]

   </MTSearchContext>

Is that right?  Although I would argue that my way is more standard,
it sounds like we're in some agreement too.

>  Fair enough, but doesn't each blog (whether public or private) have
>  its own search results template.

Yes, but (and this is the part I didn't get so maybe you can clear
this up) the template is a *results display* function that happens to
often also have a search form on it.   A search can come from any form
or even a crafter URL query and, what's more, a template paramater is
(AFAIK) not a required element currently.  So, if we require a
template parameter that would prevent abuse but even then, that means
that the search template has to be loaded *first* and then parsed for
the context.

Jay


More information about the MTOS-dev mailing list