Re: Searcing
Raphael Ritz <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Organization | Humboldt-University Berlin |
| Message-ID | <[email protected]> |
Jason Walsh wrote: > HI, > > I am using the PloneSoftwareCentre to store a list of software. What I want > to be able to is filter a search so that I can return only software that has > downloads or links for a particular platform. > > The structure is PCSProjects is where I want to begin my search but I want > to be able to filter these results if one of their PCSRelease has a PCSFile > that is of a particular platform. > > I know if I was doing this using SQL you would use a join to bring back the > correct recrods in the table. Is there something similiar I can do in Plone? First, you need to make sure that your catalog has the information that it needs to perform the search, here most notably the platform dependend releases. One way could be to equip your PSC projects (by patching, subclassing or via a custom skin method) with something like a 'hasReleaseFor' method which returns a list of all platforms for which this project has a release. Now you can index this information in the catalog using a *KeyIndex*. With that in place you can perform searches like brains=catalog(portal_type="PSCProject",hasReleaseFor="Linux") HTH Raphael ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642