Documentation Center

Adding Search Categories

Search categories let users narrow their search to a particular item, such as document titles. This procedure describes how you define new search categories by targeting searches into XPaths within your XML, or search specific attributes or tags.

About this task

Entities cannot be searched.

Procedure

  1. If you are on a Legacy Content Delivery page, select Home in the breadcrumb trail.
    The Legacy Content Delivery landing page appears.
  2. In the Administration Tools pane, click Manage Application.
    The Manage Application page appears.
  3. In the navigation pane, click Search Categories.
  4. Click Add Category.
  5. In the Localized Key text box, enter the key, beginning with search.category., that will correspond to the key in the language resource files that define how the search category is presented to the user.
    For example, search.category.table.title is displayed in English as Table Titles.
  6. In the XPath and attribute text boxes, enter strings that define the location in the document to search.
    The following table shows sample strings and the search categories and XPath strings they produce.
    XPath and Attribute Text BoxesSearch Category

    XPath: //table

    Attribute: blank

    Searches text in tables (//table)

    XPath: //table

    Attribute: @title

    Searches table titles (//table/@title)

    XPath: //*

    Attribute: @scope

    Searches the scope attribute on all elements (//*/@scope)

    XPath: //table[@outputclass='simple']

    Attribute: @title

    Searches the titles of tables that have an output class of simple (//table[@outputclass='simple']/@title)
  7. Enter the XML standards for which this search category applies. For example, DITA.
    Enter multiple XML standards by separating each by a comma. For example, DITA,S1000D.
  8. Click Save.
  9. Add the localized key to your languages.
    For example, add <item name="search.category.tables.title" value="Table Titles"/>.
  10. Click Reindex.