我正在使用elasticsearch索引两种类型的对象 -
数据详情
合约对象~60个属性(对象大小 - 120个字节)风险项对象~125个属性(对象大小 - 250个字节)
合同是风险项目的父母(_parent)
我在单个索引中存储了2.4亿个这样的对象(2.1亿个风险项目,3000万个合同)
索引大小为 - 322 gb
群集详细信息
11 m2.4x.large EC2 box [68 gb内存,1.6 TB存储,8个内核](1个盒子是一个负载均衡器节点,node.data = false)50个分片1个副本
elasticsearch.yml
node.data: true
http.enabled: false
index.number_of_shards: 50
index.number_of_replicas: 1
index.translog.flush_threshold_ops: 10000
index.merge.policy.use_compound_files: false
indices.memory.index_buffer_size: 30%
index.refresh_interval: 30s
index.store.type: mmapfs
path.data: /data-xvdf,/data-xvdg
Run Code Online (Sandbox Code Playgroud)
我正在使用以下命令启动elasticsearch节点 - /home/ec2-user/elasticsearch-0.90.2/bin/elasticsearch -f -Xms30g -Xmx30g
我的问题是我正在运行以下关于风险项类型的查询,并且大约需要10-15秒来返回数据,共计20条记录.
我正在以50个并发用户的负载运行它,并且并行发生大约5000个风险项的批量索引负载.
查询(使用加入父子)
HTTP://:9200/contractindex/riskitem/_search*
{
"query": {
"has_parent": {
"parent_type": "contract",
"query": {
"range": {
"ContractDate": {
"gte": "2010-01-01"
}
}
}
}
},
"filter": { …Run Code Online (Sandbox Code Playgroud) 我们是弹性搜索和NEST的新手.
我们正在尝试使用C#客户端 - NEST进行区分大小写的搜索.我们已经阅读了很多帖子,但无法弄明白.有人可以通过详细的分步说明来取悦我们.
任何帮助将受到高度赞赏.
谢谢,VB.