Custom Search

A flexible power search creator for Plone

Version

Version 0.5.3

Copyright and licence

Copyright 2006 Red Innovation

Licenced under GPL.

Purpose

Custom Search aims to making custom search queries for Plone sites as easy as possible. The search result listing can be customized to be more descriptive than with the standard Plone search. Powerful search features help to target searches better.

More example screenshots can be found at the documentation area.

Features

Future features

These features are not yet in Custom Search, but are planned in the future

Dependencies

Custom Search is tested on Plone 2.1.x and Plone 2.5.x.

Following Plone add-on products are needed to run Custom Search

Installation

For the sake of easy installation, AdvancedQuery and DataGridField are bundled inside the download package. These might collide with your versions, so don't let them overwrite your existing installations.

  1. Put AdvancedQuery to your Plone 's Products folder
  2. Put DataGridField to your Plone's Products folder.
  3. Put CustomSearch to your Plone's Products folder.
  4. Run Plone quick installer for DataGridField and CustomSearch

Quality

This is a beta release and still a bit proof-of-concept. The product is in limited production usage, but to make more generalized and bullet proof, more work is needed. Please contact the authors if you need to make work based on this product for joint efforts.

References

A little demo is available at List it your way -site.

Usage

Edit mode

The purpose of edit mode is to allow the site manager to customize the search easily. In edit mode, Custom Search appears as any standard Plone content with edit fields available. Since the edit mode form is quite crowded, use Plone's full screen edit mode (the icon at top right corner). If you manage to get Custom Search to non-working state, add /edit after Custom Search URL and you get yourself back to edit mode again.

One can create Custom Search as any other content type from Add XXX content drop down menu.

Title and description are self-explaining and they will be used in Plone folder listing, navigation tree and site map.

Body text allows the site manager to give some help text for the usage of the search.

The search result listing page template is for site creators who wish to use custom page templates for their search result listing. Don't touch this unless you know what you are doing!

The last field, fields, is a table defining search fields.

Search fields descriptions

View mode

When Custom Search content is displayed in view mode a seach query form appears. When user enters search query for the first time, results are displayed below the search query form. Search results are linkable (i.e. the link can be used to copy-paste search result listing for other people/pages).

Limiting search area

Often, for the sake of results clarity, the search needs to be targetted to specific content type or site area. Let's not leave this burden to our clueless users. With Custom Search, one can limit searches as well as one can make custom queries.

To limit searches

Partial text matching

The index defines how the text is matched during the search. With the stock Plone, fields which are indexed with ZCTextIndex, are automatically partially matched. Fields indexed with FieldIndex are matched by value.

Sorting

Custom Search can have forced in sort keys and user selectable sort keys. Unlike in stock Plone, many sort keys can be given since we use AdvacendQuery searching back end.

Sort key field descriptions

Special note about sorting and ZCTextIndex

ZCTextIndex indexes (like Title and Description) are not sortable. To sort the results based on title, use sortable_title index.

Indexes and metadata

Indexes are the foundation of searching. Indexes hold copies of object information in easy to match form and index value->actual object mapping. Metadata is exact duplication of information which can be displayed without retrieving the actual object from database. Always when possible, indexes and metadata should be used for listing information, since retrieving individual content objects from Zope database is a very slow operation.

Every time object is created, edited or deleted, corresponding indexes and metadata are updated so that search catalog stays up-to-date.

Custom Search allows you to to pick indexes and metadata from Plone's portal_catalog tool values. To add more indexes and metadata, go to Zope management interface and portal_catalog tool. You can refer to how to Adding new fields to Smart Folders search.

Different Plone indexes

Note that FieldIndex cannot do partial text matching, you need to use ZCTextIndex always for that.

For example, if your custom content type has declared a field "price" in its schema and you want to make this field available for Custom Search

  1. Create FieldIndex getPrice in portal_catalog, Zope management interface
  2. Create metadata getPrice in portal_catalog, Zope management interface
  3. Create a custom search, with a search field definition
    1. Name = Price
    2. Index = getPrice
    3. Type = MinMax (suits for a price well)

This process should not be confused with setting "searcahble=True" in Archetypes schema declaration. searchable=True means that the field is text indexes and available for full text search in Plone default text search.

Sponsorship

This product development was sponsored by www.listityourway.com and Amaze Internet Services.

Contact

To ask help, to sponsor Custom Search development, to take over the project or to hire skilled Plone developers, please contact us. Also, you can use plone.org product area issue tracker to report bugs and suggestions.

info@emergetec.com

www.emergetec.com

Wishing a happy Ploning,

Tim "duffyd" Knapp