Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sajari

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sajari

JavaScript SDK for the Sajari search API

  • 0.14.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
255
decreased by-6.93%
Maintainers
3
Weekly downloads
 
Created
Source

Sajari Javascript SDK

npm docs license

The Sajari Javascript SDK provides web integration for browsers.

Sajari Search is a hosted search and recommendation service supporting instant search, faceted search, recommendations and custom matching algorithms

This module is for querying the search service. If you want automated indexing, profiling and convenience functions for rendering HTML, please check out sajari-website instead.

Table of Contents

Setup

sajari is 11KB gzipped.

NPM, Browserify, webpack

npm install sajari --save

Getting Started

A quick example showing how to run a search 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 the requesting and callbacks.

Documentation

Documentation can be found at https://doc.esdoc.org/github.com/sajari/sajari-sdk-js/.

License

We use the MIT license

Browser Support

This library uses the Fetch API. Fetch is available on all evergreen browsers (Chrome, Firefox, Edge), see here for a more complete overview. We recommend using isomorphic-fetch to increase compatibility across other browsers and Node.js.

Keywords

FAQs

Package last updated on 15 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc