How to optimize data structure with nested type

My ES index and type mapping is as follows:

curl -XPUT 'http://192.168.1.1:9200/linkdb/' -d '{
"settings" : {
"number_of_shards" :20,
"number_of_replicas":1,
"index.translog.flush_threshold_ops": "100000"
}
}'

curl -XPUT http://192.168.1.1:9200/linkdb/FriendLink/_mapping -d '{
"FriendLink": {
"_source" : { "compress": "true"},
"_all" : {"enabled" : "false"},
"properties": {
"_id" : {"type" : "string", "store" : "no"},
"Tl" : {"index" : "no","type" : "string", "store" : "no"},
"DM" : {"index" : "not_analyzed","type" : "string", "store" : "no"},
"SF" : {"index" : "not_analyzed","type" : "string", "store" : "no"},
"Num" : {"index" : "not_analyzed","type" : "integer", "store" :
"no"},
"RK" : {"index" : "not_analyzed","type" : "integer", "store" : "no"},
"LK" : {
"type" : "nested",
"properties" : {
"D" : {"index" : "not_analyzed","type" : "string", "store" : "no"},
"H" : { "index" : "not_analyzed","type" : "string" , "store" : "no"},
"P" : { "index" : "not_analyzed","type" : "string" , "store" : "no"},
"T" : {
"type" : "multi_field",
"fields" : {
"T":{"type" : "string","indexAnalyzer": "standard", "searchAnalyzer":
"standard", "store" : "no"},
"UT":{"index" : "not_analyzed", "type" : "string", "store" : "no"}
}
},
"I" : { "index" : "not_analyzed", "type" : "boolean", "store" :
"no" }
}
}
}
}
}'

My query is as follows:

curl -XGET 'http://192.168.1.1:9200/linkdb/FriendLink/_search?
pretty=true' -d '{
from: 0, size: 10,
fields:["_id","Tl","Num","RK","LK"],
"sort":[
{ "Num" : {"order" : "desc"} }
],
"filter" : {
"nested" : {
"path" : "LK",
"query" : {
"bool" : {
"must" : [
{ "term" : { "LK.D" : "baidu.com" } } ,
{ "prefix" : { "LK.P" : "/news" } },
{ "text" : { "LK.T" : "百度" }
]
}
},
"_cache" : true
}
}

}'

I use nested object type. There are about fifty million documents
now,each document an average of 30 nested objects.
It takes an average of a few hundred milliseconds to query once。
With the growth of the data, the query speed is getting slower and
slower.
If the data is more than 100 million documents , I worry about more
than one second average query.
For this nested type , I do not know how to optimize my data
structure.
Can you help me? Thanks very much.

--
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.