tire rails active record model omitting some columns

160 Views Asked by At

I added a new column for a rails model and recreated the index but it was not included in searching. so i checked in with browser gui that shows the column listing in left panel but not in the main index search. also interestingly paperclip field is not recognized it goes with the same name as has_attached_file.so how to manually add columns for indexing in a active record model. also used mapping but no use.

1

There are 1 best solutions below

0
On

The problem was with to_indexed_json method.

as tire uses active records to_json method which i had overridden. when i added the new column in rails migration i never added it to the overridden as_json method.

for further details

ElasticSearch & Tire: Using Mapping and to_indexed_json