I have one massive model (It basically is my entire app). I have 7 or more associations on this model, including many to many, :through => etc. This model also has a few simple attributes (title, url, and so on).
The only thing I care about indexing are those 3 or 4 simple attributes (title, url, description, category). The rest I don't care about.
Everything works perfectly when I use load: true
, but as soon as I turn that off everything breaks. The only way to fix this it seems is to go in and add complex mappings, :touch, :touch callbacks and so on for every single association?
I hope I'm understanding this wrong because this would be a huge amount of code only to search through 3 or 4 simple attributes.
I have no idea what I'm talking about but could I maybe search through the elasticsearch index, but return a list of ID's, and just loop through those in the normal rails way?
Thanks!