Update ElasticSearch mapping in production (Tire)

被刻印的时光 ゝ 提交于 2019-12-06 10:51:38

You should keep the old index around until you're sure the new index is 100% what you want. You can flip the alias back if that would not be the case.

There's an integration test in Tire test suite for "flipping aliases".

To add a new column to an index:

index = Tire.index("articles")

index.mapping("article", :properties => { :pinterest_shares => {:type => 'integer', :index => 'not_analyzed', :include_in_all => false} })
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!