From b313902eddc439eb25ddb829336a2def01b6d836 Mon Sep 17 00:00:00 2001 From: Michael Baird Date: Thu, 13 Jul 2017 14:24:20 -0500 Subject: [PATCH] clarify sort order in TopN doc --- docs/query-language.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/query-language.md b/docs/query-language.md index 106bfb08f..cf551b3b5 100644 --- a/docs/query-language.md +++ b/docs/query-language.md @@ -342,9 +342,9 @@ have the attribute specified by `field` with one of the values specified in **Result Type:** array of key/count objects **Caveats:** -* TopN will return the top bitmaps by count only on frames with a ranked cache. +* TopN on a frame with ranked cache will return the top bitmaps sorted by count. +* Non-ranked frames maintain a LRU (least recently used) cache, thus a TopN query on this frame will return bitmaps sorted in most recently setbit order. * The frame's cache size determines the limit of sorted bitmaps. -* Non-ranked frames maintain a LRU (least recently used) cache, thus a TopN query on this frame will return bitmaps in most recently setbit order. * The ranked cache maintains a sorted set of bitmaps by count up to the cache size. * Once full, the cache will truncate the set of bitmaps at the frame options CacheSize limit. Bitmaps with a similar count that straddle the limit will be truncated in no particular order. * The TopN filter operation only applies to data in the cache, and not all bitmaps in the frame.