Using min_doc_countwith order: ascendingdoes not work as you would like.
TL; DR: shard_size / shard_min_doc_count .
:
min_doc_count .
, , min_doc_count , Elasticsearch , doc_count > min_doc_count.
, :
terms | doc_count
----------------
lorem | 3315
ipsum | 2487
olor | 1484
sit | 1057
amet | 875
conse | 684
adip | 124
elit | 86
size=3 min_doc_count=100, Elasticsearch :
conse: 684
adip : 124
elit : 86
doc_count>100, :
conse: 684
adip : 124
, "amet" (doc_count = 875). Elasticsearch .
doc_count < 1000, , , , .
Elasticsearch ?
, . , . Elasticsearch , , .
? .
, , 800 000 , ( 4), ( 1 ).
doc_count > 1000 ( 200 000, , ..). , 999 , . 1 . , .
, Elasticsearch :
doc_count .- doc_count ( , ):
shard_min_doc_count. size * 1.5 + 10 (shard_size) node. , , .- node.
min_doc_count.size / .
, ?
, , , . , :)
:
shard_size [your number of terms with a doc_count below your threshold] + [the number of values you want if you want exact results].
doc_count>=1000, ( ), order: ascending.
, , , ES.
( )
shard_size [the number of values you want if you want exact results]. , . .
shard_min_doc_count . , ( ) / .
. , . ES, .
NB: ( , ), , .
PS: Elasticsearch, Kibana, , Kibana , , ? "", , (: http://imgur.com/a/dMCWE).