ElasticSearch性能优化与问题排查实战
1. 预热器测试
为了测试预热器,我们进行一个简单的测试。首先,创建一个简单的索引,使用以下命令:
curl -XPUT localhost:9200/docs -d '{ "mappings" : { "doc" : { "properties" : { "name": { "type": "string", "store": "yes", "index": "analyzed" } } } } }'接着,创建一个名为child的新类型,作为之前doc类型文档的子文档,使用命令:
curl -XPUT 'localhost:9200/docs/child/_mapping' -d '{ "child" : { "_parent":{ "type" : "doc" }, "properties" : { "name": { "type": "string", "store": "yes", "index": "analyzed" } } } }'之后,索引一个doc类型的文档和大约80,000个child </