1. 程式人生 > >ES錯誤Error:Failed to parse mapping [data]:[_ttl] is removed in 5.0

ES錯誤Error:Failed to parse mapping [data]:[_ttl] is removed in 5.0

error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Failed to parse mapping [data]: [_ttl] is removed in 5.0. As a replacement, you should use time based indexes or cron a delete-by-query with a range query on a timestamp field."}]

這個地方其實說的是挺明白了,就是ES的版本不對,5.0版本之後刪除了某些方法。這個是因為docker自動下載的時候,是下載了最新版本的映象,導致ES元件版本不對而報錯了。
解決辦法:
下載某個特定版本的ES。