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:
- GET the search form: https://www.onlinestore.com/searches/<scope>/keywords/form
- Fill out the form
- POST the form to the form's itemkeywordsearchaction link
- GET the search results link returned by Cortex
- 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.