Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Search for Items

Search for Items

The search resource uses the Elastic Path Search Server to perform searches. This works by Cortex sending keywords to the search server for processing. Once the search server processes the search, the results are returned to Cortex so clients can retrieve them from the API.

Tip: Reduce Search Request Calls

You can reduce the number of calls required for searching by using ?followlocation. For more information on this feature, see FollowLocation. The example follows the standard search workflow, which does not use ?followlocation.

Search Workflow:
  1. GET the search form:<scope>/keywords/form
  2. Fill out the form
  3. POST the form to the form's itemkeywordsearchaction link
  4. GET the search results link returned by Cortex
  5. GET a search result element to view the item


Tip: Paging through Search Results

Search results objects contain links, "rel":"next" and "rel":"previous", to allow clients to page through search results. GET these links to either page forward or page backwards through the search results.