Apologies for my dense-ity. Elasticsearch & Tire have my head spinning...
I'm looking for an example of how to index a parenthttp://www.elasticsearch.org/guide/reference/mapping/parent-field.htmlchild relationship between a
Page and a Report model in Rails.
Should I use the report_id attribute of Page and index it as "_parent" or
do something like Karmi suggests herehttp://stackoverflow.com/questions/11692560/elasticsearch-tire-and-nested-queries-associations-with-activerecord.
And if so will the _parent relationship be established automatically?
In my Page model I have:
class Page < ActiveRecord::Base
attr_accessible :filename, :page_num, :parent_code
indexes :id, :type => 'integer'
indexes :report_id, :type => 'integer' # but how is this
associated with _parent?