Giter Site home page Giter Site logo

meteor-algolia's Introduction

meteor-algolia

Meteor package to handle the blazing fast Algolia search engine (working on client and server).

Example

Server side

var client = AlgoliaSearch(<algolia_application_id>, <algolia_private_id>);

var index = client.initIndex(<algolia_index_name>);

// array contains the data you want to save in the index
var array = [ { objectID: 1, text: 'Hello' }, { objectID: 2, text: 'World' }  ];
index.saveObjects(array, function (error, content) {
  if (error) console.error('Error:', error);
  else console.log('Content:', content);
});

Client side

var client = AlgoliaSearch(<algolia_application_id>, <algolia_public_id>);

var index = client.initIndex(<algolia_index_name>);

// search 'hello' in the index
index.search('hello', function (error, content) {
  if (error) console.error('Error:', error);
  else console.log('Content:', content);
});

Meteor example app

There's a working example in the example directory.

  • cd example
  • meteor

Check the source code.

Documentation

Read the official Algolia doc for the available functions and options.

Changelog

  • Moved to algolia 3.9.1
  • The global object is now called AlgoliaSearch both on client and server
  • Moved to algolia v3+ check the migration guide
  • Moved to algolia 3.7.8
  • Add a working client and server example (cd example; meteor)

meteor-algolia's People

Contributors

acemtp avatar callmephilip avatar shipow avatar yubozhao avatar

Watchers

James Cloos avatar Alexandru Bunduc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.