Welcome to Squishdot Websites Squishdot How-To
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Expanded Search capabilities
How-To Posted by grant on Thursday December 13, 09:56PM, 2001
from the dept.
How can you have the search engine search for documents outside of postings.

My site uses the forum as it's home page and it would be excellent if the search could include other parts of the site.

<  |  >

 

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

    Re: Expanded Search capabilities
    by Jeremy Stark on Wednesday December 19, 06:12PM, 2001
    I'm sure there are better ways but I can suggest 2 methods to get you started.

    Method 1:

    First thing to do is create a new catalog in your Squish folder. Have it automatically create a new vocabulary. After creating the catalog, go to it's management interface and into the 'Find Objects' tab. Select DTML documents from the first list and click 'Find and Catalog'. You may want to catalog other stuff , but I'm keeping this to the basics ( you can multi-select in the box with ctrl-click ).

    Now go back to your squish folder and create a 'Z Search Interface'. In the 'Searchable Objects' box select both 'news' and your new catalog. Provide id's for both the search DTML method and report method and create the object.

    Zope will create both a unified search interface and report DTML method for both catalogs. They are plain vanilla and will have to be modified to fit the Squish look and feel.

    Method 2:

    The routine that implements Squish searches is on line 742 of the SquishSite.py file in the Squishdot product folder. You can see this method being called in the dtml with lines like:

    • ./search?title=RFC...
    • ./search?subject=(dtml-var ...)

    You could make the calls from your own report form to this method. The results of the search are returned in a variable called 'search_results'. Instead of selecting both 'news' and the new catalog you could just create an interface to the new one and add your own code to search the Squish articles.

    At anyrate, you will have to create a new ZCatalog in order to get the other content on your site indexed. From there it's just integrating the search results page.

    Kind Regards

    [ Reply to this ]
    • Re: Expanded Search capabilities
      by grant on Thursday January 03, 10:39PM, 2002
      Thanks for the reply, I also noticed that the search doesn't seem to work if your searching for just a number with no letters in the field...weird
      [ Reply to this ]
      • Blame ZCatalog ;-)
        by Chris Withers on Tuesday January 08, 01:17PM, 2002
        Sorry, ZCatalog, which Squishdot uses for its full text indexing, doesn't think people would want to search for a number on its own and so strips them all out ;-S

        Chris
        [ 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.