Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Build unique search experiences for ambitious web applications. (See what I did there?)

Notifications You must be signed in to change notification settings

rosschapman/ember-algolia-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐹 + 🔍

  • Update 9/26/17: This code is hella old and was a bit early days in my Ember usage. But proud it helped us get some things done back in those days. :)

The Ember.js framework and Algolia make a pretty slick team for powering a user-friendly search experience.

This small library demonstrates one way to splice Ember and Algolia based on my work on Science Exchange's online marketplace. It's akin to Algolia's own example marketplace project for WordPress plugins. The code assumes a split interface between results and filters, which might look a little something like:

Example of Science Exchange search interface

Usage example

export default Ember.Route.extend({
  model: function(params) {
    var {
      q,
      page
    } = params;
    var options = {
      query: q,
      page: page,
      facetFilters: params.facetFilters,
    };
    return this.store.adapterFor('algolia').query('model-name', options);
  },
  setupController: function(controller, model) {
    this._super(controller, model);
    controller.setProperties({
      facets: model.facets,
    });
  },
});

About

Build unique search experiences for ambitious web applications. (See what I did there?)

Resources

Stars

Watchers

Forks

Packages

No packages published