Searching Content


In Plone, you can perform a simple keyword search, or you can try to pinpoint your search results by using the Advanced Search feature. The simple Keyword Search field is found in the upper-right corner in the standard Plone template. Type your keyword and press the Search button to display your results. On the results page, you will either see matching results or a message that no results were found. With either message, you also are presented with a link to the Advanced Search form.

All types of Plone content, including comments attached to items, are searchable. Even if a keyword is not found in a main item, such as a news item, if a comment has been added to the item and it contains the keyword used in the search, the comment is returned as a matching item. Figure 3.20 shows sample search output. As you can see, the identification icons are used to show the type of item in which the keyword was found. Additionally, the title of the item is used as the link, and any description or lead-in text is used in the search results display.

Figure 3.20. Successful search results.

The search results page is structured exactly the same, regardless of whether you're using the simple search or the advanced search. The next section details the elements of the Advanced Search form.

Using Advanced Search

The Advanced Search form enables you to find more precise results because you can enter search criteria for specific areas of an item, such as its title and description. You also can select only specific item types to search, and you can filter results by author. Additionally, you can look for items that were added only within a certain time frame, such as the last week or the last month. Any combination of these search criteria is possible; the more precise the combination of search criteria is, the better the overall search results will be.

These are the fields on the Advanced Search form:

  • Search Text ” Text entered here is the text for which you want to search. If you enter more than one term , you can use the Boolean AND or OR, such as "important AND memo" instead of just "important" and "memo"; the first search would return items that match both terms, while the second search would return anything with important and anything with memo , regardless of whether they're together in the same searchable content.

  • Title ” Text entered in this field is used to match text in the item's Title field. For example, if you are searching on the term memo in the Title field and it appears only in the body text, that is not a successful search. The term must appear in the Title field for the search to be successful.

  • Keywords ” If you select one or more keywords from this select list, they must all be present in the keywords elements of the item. Keywords are added via item properties at the time of publishing. Any keywords that have been added for any items in the Plone installation are available for selection in this select list.

  • Description ” Text entered in this field is used to match text in the item's Description field. This field works much like the Title field described earlier: If the term is present in this field, you're in luck; otherwise , the search fails.

  • New Items Since ” Use this field to limit your search to items added since your last login, in the last day, the last week, in the last month, or ever.

  • Item Type ” Check one or more check boxes, to limit your search to items of a specific type. The number of check boxes corresponds to the number of content types available in your Plone installation and, thus, varies. For example, if you install Plone add-ons that create their own content types, such as photo albums and message boards , these types are represented in this list.

  • Author ” Select a Plone user from the drop-down list, to limit your search to items published by this user .

  • Review Status ” Check any combination of All, Published, or Visible to limit your search to items that are in these states.

The Advanced Search form allows for great customization in your search. However, this can be a blessing or a curse. The more search criteria are used, the more specific the search is and, thus, the likelihood increases that you might inadvertently filter out some results. If you use the Advanced Search, you might want to start with your ideal set of filtering criteria and then remove some filters to see if your results change.

Plone Content Management Essentials
Plone Content Management Essentials
ISBN: 0672326876
EAN: 2147483647
Year: 2003
Pages: 107
Authors: Julie Meloni © 2008-2017.
If you may any questions please contact us: