Cortex Client Developer Documentation

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: https://www.onlinestore.com/searches/<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

search_workflow

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.