Welcome to Squishdot Websites Squishdot How-To Newbies
 post article
 Mailing Lists
 Bug Tracking


Simple Search
How-To Posted by Mark Matthews on Tuesday August 03, 05:23PM, 2004
from the am-sure-i'm-missing-something dept.
How can I make a simple search form that will take only one input and use this to search in all of the title, body, authour, subject/summary and main body all at the same time?

We can do this now by typing the same data into all the boxes, but our users are finding this very tedious....

<  |  >


Related Links
  • Articles on How-To
  • Also by Mark Matthews
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Not so simple.
    by Chris Withers on Monday August 09, 10:26PM, 2004
    What you really want is to search over all the content of these fields, not just find postings which have your search term in every field, right?

    Adding one of these:

    ...to your Squishdot's manage_catalogIndexes page and re-indexing everything, and then adding a box on the search form that plugs into this new index should do what you need.

    Other than that, have a Script (Python) called "everything" in your site that does something like:

    return ' '.join((context.title,context.body,context.author,context.summary))

    ..and then add add a ZCTextIndex called "everything" to the indexes page mentioned above and re-index everything.

    Finally, add an "everything" box to the search page and wire it into the search method.
    [ Reply to this ]
    • Re: Not so simple.
      by Klaus Thorn on Tuesday November 30, 03:43PM, 2004
      Thank you. If you want to improve the Squishdot Releases, then you could make this global search the default. Me and the users of my Squishdot installations would appreciate it. Right now no one uses the search field any more. Old articles are kind of lost because they are too hard to find.
      [ Reply to this ]
    Re: Simple Search
    by Mark Matthews on Wednesday August 11, 03:26PM, 2004
    Thanks, I will try the ManagableIndex object :-)
    [ Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.