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

aws-did-you-mean

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-did-you-mean

A simple module to interface with AWS CloudSearch's suggester

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

aws-did-you-mean

AWS CloudSearch suggester

This little tool will help you retrieve suggestions from AWS CloudSearch. It's nothing fancy, but it does the job. Pass in your CloudSearch specifics, a suggester, and ultimately a query.

Usage

Install

npm install aws-did-you-mean --save

Example

// Create object, and initialise with project specific options
var suggest = new Suggest(
    {
        name: 'coffee-bean-ninja',
        id: 'jl7xoqkekxqshi4vlteubco26i'
    }
);

// We must set the suggester (here, or in the options object passed
// to the constructor).
suggest.setSuggester('bean_suggester');

// Get all suggestions. You'll get an err object if something went wrong.
// Otherwise, you'll get an array of results (which may be empty).
suggest.getAll('amant', (results, err) => {
    if (!err) {
        console.log('Found ' + results.length + ' suggestion(s):');
        results.forEach((item, i) => {
            console.log(i+1 + ' -> ' + item.suggestion);
        });
    } else {
        console.log(err);
    }
});

Warning

This is a work in progress. Use at your discretion, and your own risk.

License

This tool is released under an MIT license.

Keywords

FAQs

Package last updated on 25 Nov 2016

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