This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Assumes the following div exists in the page, note: you can change this using the "attachDynamicContent" setting | |
// <div id="dynamic-content"></div> | |
// 2. The "pipeline" parameter controls the query execution, this example uses "popular", this is configurable | |
// 3. The "values" map controls the query. You don't need the "q" parameter, but can use this to control the context of | |
// the results. For example you may wish to use the "document.title" to find related content to the current page | |
// 4. The filter parameter allows any number of filters to be used to filter the query results, e.g. to domains, or sections, | |
// or any other number of factors | |
var recommend = setup(window, document, "script", "sajari", "//cdn.sajari.net/js/integrations/website-search-1.4.js"); | |
recommend({ |