Sajari Search is a hosted search and recommendation service supporting instant search, various recommendations widgets and automatic content indexing.
This library is UMD compatible, you can use it with any module loader.
If you don't use a module loader, it will export an
SJ method into the
window object. This is the default install code shown in your Sajari control panel.
npm install sajari-website --save
This module is designed for browser integration. It is a wrapper for the base Sajari API module that automatically integrates several key functions:
Simple search integration using an overlay to display results:
Search integration displaying 5 results within the page (note: results can be placed anywhere):
Advanced example: Search integration favouring recent and local results, filtering to show only the "bike" category, displaying within the page (note: results can be placed anywhere):
Related (to current page) recommendations integration:
Popular (site wide) recommendations integration:
Related recommendations integration with 3 results, limited to pages where the URL contains "comedy", favour local results (works if pages have a lat-lng):