Created
May 1, 2015 12:57
-
-
Save ThomasBush/793773c6e75bbbf9bed4 to your computer and use it in GitHub Desktop.
Algolia Index question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
algoliasearch index_name: "products" do | |
# currently working | |
attribute :id, :product_number, :name, :family_id, :slug, :collection_id, :benefits, :categories | |
# refined indices I would like to have | |
attribute :id, :product_number, :name, :family_id, :slug, :collection_id | |
attribute :benefits do | |
{ id: benefits.id, name: benefits.name } | |
end | |
attribute :categories do | |
{ id: categories.id, name: categories.name } | |
end | |
# tags used for filtering | |
tags do | |
[benefits_ids, categories_ids] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment