I can't seem to figure out how to edit indexed element. Google doesn't give me an answer either. So, I'm not sure if it's possible at all? What I have done before is just to reindex the whole thing, but as the data grows it becomes slower and slower. How do I reindex just one element after it's been edited.
Here's what I'm doing right now.
def add_ele(ele)
Tire.index ELE_INDEX do
store :id => ele.ele_id, :title => ele.title, :tags => ele.tags, :itunes_description => ele.itunes_description
refresh
end
end
def delete_ele_index
Tire.index ELE_INDEX do
delete
end
end
So I just delete the whole index and loop through all the elements in the database to add them back again. Thanks very much for the help.