I'm using elasticsearch to index two types of objects -
Data details -
Contract object ~ 60 properties (Object size - 120 bytes)
Risk Item Object ~ 125 properties (Object size - 250 bytes)
Contract is parent of risk item (_parent)
I'm storing 240 million such objects in single index (210 million risk
items, 30 million contracts)
Index size is - 322 gb
Cluster details -
11 m2.4x.large EC2 boxes [68 gb memory, 1.6 TB storage, 8 cores](1 box is a
load balancer node with node.data = false)
50 shards
1 replica
===
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
===
I'm starting the elasticsearch nodes with following command -
/home/ec2-user/elasticsearch-0.90.2/bin/elasticsearch -f -Xms30g -Xmx30g
My problem is that I'm running following query on risk item type and it is
taking about 10-15 seconds to return data.
I'm running this with a load of 50 concurrent users and a bulk index load
of about 5000 risk items happening in parallel.
Query -
http://:9200/contractindex/riskitem/_search
{
"query": {
"has_parent": {
"parent_type": "contract",
"query": {
"range": {
"ContractDate": {
"gte": "2010-01-01"
}
}
}
}
},
"filter": {
"and": [{
"query": {
"bool": {
"must": [{
"query_string": {
"fields": ["RiskItemProperty1"],
"query": "abc"
}
},
{
"query_string": {
"fields": ["RiskItemProperty2"],
"query": "xyz"
}
}]
}
}
}]
}
}
Can somebody please help me with how I can improve this query performance ?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.