sajari

0.20.0 • Public • Published

Sajari Javascript SDK (Browser only) · npm build status docs license

The Sajari Javascript SDK provides a basic API for querying Sajari search services from web browsers.

If you are want to create a search UI for your website then checkout our React SDK or generate a search interface from our Console.

Table of Contents

Install

npm install --save sajari

Getting Started

A quick search example using the website search pipeline.

import { Client, Tracking } from "sajari";
 
const client = new Client("<project>", "<collection>");
 
const tracking = new Tracking();
tracking.clickTokens("url");
 
client.searchPipeline(
  "website",
  { q: "Foo Bar", resultsPerPage: "10" },
  tracking,
  (err, res) => {
    console.log(err || res);
  }
);

The Client object handles making requests and callbacks.

Documentation

Full documentation can be found at https://sajari.github.io/sajari-sdk-js/.

License

We use the MIT license

Dependents (2)

Package Sidebar

Install

npm i sajari

Weekly Downloads

247

Version

0.20.0

License

MIT

Last publish

Collaborators

  • wwalser
  • mish15
  • tbillington
  • dhowden