【发布时间】:2014-12-25 01:48:19
【问题描述】:
我们已经设置了具有 7 个节点的 elasticsearch 集群。每个节点的配置类似于16G RAM, 8 Core cpu, centos 6。
Elasticsearch 版本:1.3.0
堆内存是 - 9000m
1 Master (Non data)
1 Capable master (Non data)
5 Data node
有 10 个索引,其中一个索引有 5500 万个文档 [254Gi(508Gi 有副本)] 大小其余所有索引都有大约 20k 个文档。
每 1 秒有 5-10 个新文档正在索引。
但问题是搜索有点慢。几乎取2000 ms 到5000 ms 的平均值。一些查询在 1 秒内完成。
映射:
{
"my_index": {
"mappings": {
"product": {
"_id": {
"path": "product_refer_id"
},
"properties": {
"product_refer_id": {
"type": "string"
},
"body": {
"type": "string"
},
"cat": {
"type": "string"
},
"cat_score": {
"type": "float"
},
"compliant": {
"type": "string"
},
"created": {
"type": "integer"
},
"facets": {
"properties": {
"ItemsPerCategoryCount": {
"properties": {
"terms": {
"properties": {
"field": {
"type": "string"
},
"size": {
"type": "long"
}
}
}
}
}
}
},
"fields": {
"type": "string"
},
"from": {
"type": "string"
}
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"lang": {
"type": "string"
},
"main_cat": {
"properties": {
"Technology": {
"type": "double"
}
}
},
"md5_product": {
"type": "string"
},
"post_created": {
"type": "long"
},
"query": {
"properties": {
"bool": {
"properties": {
"must": {
"properties": {
"query_string": {
"properties": {
"default_field": {
"type": "string"
},
"query": {
"type": "string"
}
}
},
"range": {
"properties": {
"main_cat.Technology": {
"properties": {
"gte": {
"type": "string"
}
}
},
"sub_cat.Technology.computers": {
"properties": {
"gte": {
"type": "string"
}
}
}
}
},
"term": {
"properties": {
"product.secondary_cat": {
"type": "string"
}
}
}
}
}
}
},
"match_all": {
"type": "object"
}
}
},
"secondary_cat": {
"type": "string"
},
"secondary_cat_score": {
"type": "float"
},
"size": {
"type": "long"
},
"sort": {
"properties": {
"_uid": {
"type": "string"
}
}
},
"sub_cat": {
"properties": {
"Technology": {
"properties": {
"audio": {
"type": "double"
},
"computers": {
"type": "double"
},
"gadgets": {
"type": "double"
},
"geekchic": {
"type": "double"
}
}
}
}
},
"title": {
"type": "string"
},
"product": {
"type": "string"
}
}
}
}
}
}
我们正在使用Default Analyzer。
有什么建议吗?这个配置还不够吗?
【问题讨论】:
-
请提供一些关于您正在索引的内容以及索引方式(分析器等)的详细信息
-
@X.L.Ant :添加了映射。谢谢
标签: elasticsearch