mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 08:10:50 +00:00
Merge pull request #731 from raskle/723-topn-cache-doc
frame cache caveats documentation
This commit is contained in:
commit
07a0e12fd6
1 changed files with 7 additions and 0 deletions
|
|
@ -341,6 +341,13 @@ have the attribute specified by `field` with one of the values specified in
|
|||
|
||||
**Result Type:** array of key/count objects
|
||||
|
||||
**Caveats:**
|
||||
* Performing a TopN() query on a frame with cache type ranked will return the top bitmaps sorted by count in descending order.
|
||||
* Frames with cache type lru will maintain an LRU (Least Recently Used) cache, thus a TopN() query on this type of frame will return bitmaps sorted in order of most recently set bit.
|
||||
* The frame's cache size determines the number of sorted bitmaps to maintain in the cache for purposes of TopN() queries. There is a tradeoff between performance and accuracy; increasing the cache size will improve accuracy of results at the cost of performance.
|
||||
* Once full, the cache will truncate the set of bitmaps according to the frame option CacheSize. Bitmaps that straddle the limit and have the same count will be truncated in no particular order.
|
||||
* The TopN() query's attribute filter is applied to the existing sorted cache of bitmaps. Bitmaps that fall outside of the sorted cache range, even if they would normally pass the filter, are ignored.
|
||||
|
||||
**Examples:**
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue