IBM Support

PK85393: NEW METHOD FOR THE API TO ALLOW USERS TO SEARCH FOR CONTENT AND SORT RESULTS AND SEARCH IN ONLY THE SPECIFIED SITE AREAS

 

APAR status

  • Closed as program error.

Error description

  • The existing content search methods search for content in the
    specified site areas, but also all of their ancestors and
    descendants, with no way to restrict this search to only the
    specified site areas.
    Also, there was no way to sort the returned results the same way
    the menu component does, without inmplementing sorting of the
    returned results.
    

Local fix

  • A new content search method has been added to the WCM API to
    allow for sorting of results, as well as searching only in the
    specified site areas.
    It's Javadoc description is as follows.
       /**
        * Returns an iterator of IDs of objects that match the given
    search criteria.
        * All Content documents that meet the specified search
    criteria will be returned,
        * regardless of their status (search results can include
    unpublished documents).
        *
        * The content search behaves in a manner similar to the Menu
    Component.
        *
        * <p>When searching site areas, specifying
    includeAncestorSiteAreas and
        * includeDescendentSiteAreas both as false will restrict the
    search to only
        * the specified site areas.
        *
        * <p>Results can be sorted by up to three keys. The fields
    available to sort by are:
        * Workspace.SORT_KEY_NAME
        * Workspace.SORT_KEY_PUBLISH_DATE
        * Workspace.SORY_KEY_DESCRIPTION
        * Workspace.SORT_KEY_EXPIRY_DATE
        * Workspace.SORT_KEY_GENERAL_DATE_ONE
        * Workspace.SORT_KEY_GENERAL_DATE_TWO
        * Workspace.SORT_KEY_LASTMODIFIED_DATE
        * Workspace.SORT_KEY_TITLE
        * Workspace.SORT_KEY_NONE
        *
        * If less than three sort keys are required, specify
    Workspace.SORT_KEY_NONE for those
        * not required.
        *
        * The results can be sorted in ascending or descending
    order, according to the sortAscending
        * parameter. The default order, as used in the other
    contentSearch methods, is ascending.
        *
        * @param templateId the ID of the template to match
        * @param siteAreaIds the IDs of the site areas to find
    content in
        * @param categoryIds the IDs of categories for content to
    have in their profile
        * @param keywords the IDs of keywords for content to have in
    its profile
        * @param matchAllCategories indicates whether the content
    returned should match all categories (true) or any category
    (false)
        * @param sortKey1 Specify one of sort keys as first sort
    priority
        * @param sortKey2 Specify one of sort keys as second sort
    priority
        * @param sortKey3 Specify one of sort keys as third sort
    priority
        * @param sortAscending Specify true for ascending order and
    false for descending order
        *
        * @return an iterator of IDs of content that meet the search
    criteria
        */
    

Problem summary

  • New method added to the API to allow users to search for content
    and sort the results, as well as search in only the specified
    site areas.
    The existing content search methods search for content in the
    specified site areas, but also all of their ancestors and
    descendants, with no way to restrict this search to only the
    specified site areas.
    Also, there was no way to sort the returned results the same way
    the menu component does, without inmplementing sorting of the
    returned results.
    

Problem conclusion

  • A new content search method has been added to the WCM API to
    allow for sorting of results, as well as searching only in the
    specified site areas.
    It's Javadoc description is as follows.
       /**
        * Returns an iterator of IDs of objects that match the given
    search criteria.
        * All Content documents that meet the specified search
    criteria will be returned,
        * regardless of their status (search results can include
    unpublished documents).
        *
        * The content search behaves in a manner similar to the Menu
    Component.
        *
        * <p>When searching site areas, specifying
    includeAncestorSiteAreas and
        * includeDescendentSiteAreas both as false will restrict the
    search to only
        * the specified site areas.
        *
        * <p>Results can be sorted by up to three keys. The fields
    available to sort by are:
        * Workspace.SORT_KEY_NAME
        * Workspace.SORT_KEY_PUBLISH_DATE
        * Workspace.SORY_KEY_DESCRIPTION
        * Workspace.SORT_KEY_EXPIRY_DATE
        * Workspace.SORT_KEY_GENERAL_DATE_ONE
        * Workspace.SORT_KEY_GENERAL_DATE_TWO
        * Workspace.SORT_KEY_LASTMODIFIED_DATE
        * Workspace.SORT_KEY_TITLE
        * Workspace.SORT_KEY_NONE
        *
        * If less than three sort keys are required, specify
    Workspace.SORT_KEY_NONE for those
        * not required.
        *
        * The results can be sorted in ascending or descending
    order, according to the sortAscending
        * parameter. The default order, as used in the other
    contentSearch methods, is ascending.
        *
        * @param templateId the ID of the template to match
        * @param siteAreaIds the IDs of the site areas to find
    content in
        * @param categoryIds the IDs of categories for content to
    have in their profile
        * @param keywords the IDs of keywords for content to have in
    its profile
        * @param matchAllCategories indicates whether the content
    returned should match all categories (true) or any category
    (false)
        * @param sortKey1 Specify one of sort keys as first sort
    priority
        * @param sortKey2 Specify one of sort keys as second sort
    priority
        * @param sortKey3 Specify one of sort keys as third sort
    priority
        * @param sortAscending Specify true for ascending order and
    false for descending order
        *
        * @return an iterator of IDs of content that meet the search
    criteria
        */
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK85393

  • Reported component name

    LOTUS WEB CONT

  • Reported component ID

    5724I2900

  • Reported release

    60H

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-04-27

  • Closed date

    2009-04-27

  • Last modified date

    2009-04-27

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    LOTUS WEB CONT

  • Fixed component ID

    5724I2900

Applicable component levels

  • R60H PSY

       UP

[{"Business Unit":{"code":null,"label":null},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0.1.4","Edition":"","Line of Business":{"code":null,"label":null}}]

Document Information

Modified date:
10 September 2020