Skip to content

Instantly share code, notes, and snippets.

View redox's full-sized avatar
👍
Focusing

Sylvain Utard redox

👍
Focusing
View GitHub Profile
@redox
redox / Listing.rb
Last active August 29, 2015 14:15 — forked from ArunGupta25/Listing.rb
class Listing < ActiveRecord::Base
include AlgoliaSearch
algoliasearch per_environment: true, if: :saleable do
attribute :title, :designer, :price, :description, :size, :category, :price_drops, :dropped, :price_updated_at, :created_at, :cover_photo, :images_processed, :bumped_at, :location, :strata, :retina_cover_photo, :retina_cover_height, :retina_cover_width, :followerno
attributesToIndex ['unordered(designer)', 'unordered(title)', 'unordered(description)', 'category', 'size', 'price']
customRanking ['desc(price_updated_at)']
ranking ['custom', 'desc(followerno)', 'typo', 'geo', 'words', 'proximity', 'attribute', 'exact']
synonyms [