0
0
bleve/search/collectors
Marty Schoch 47c239ca7b refactored data structure out of collector
the TopNCollector now can either use a heap or a list

i did not code it to use an interface, because this is a very hot
loop during searching.  rather, it lets bleve developers easily
toggle between the two (or other ideas) by changing 2 lines

The list is faster in the benchmark, but causes more allocations.
The list is once again the default (for now).

To switch to the heap implementation, change:

store *collectStoreList
to
store *collectStoreHeap

and

newStoreList(...
to
newStoreHeap(...
2016-08-26 10:29:50 -04:00
..
bench_test.go improved implementation to address perf regressions 2016-08-25 15:47:07 -04:00
heap.go refactored data structure out of collector 2016-08-26 10:29:50 -04:00
list.go refactored data structure out of collector 2016-08-26 10:29:50 -04:00
search_test.go improved implementation to address perf regressions 2016-08-25 15:47:07 -04:00
topn_test.go refactored data structure out of collector 2016-08-26 10:29:50 -04:00
topn.go refactored data structure out of collector 2016-08-26 10:29:50 -04:00