Class: Ferret::Index::SegmentMergeQueue

Inherits:
Utils::PriorityQueue show all
Defined in:
lib/ferret/index/segment_merge_queue.rb,
ext/segment_merge_queue.c

Instance Attribute Summary

Attributes inherited from Utils::PriorityQueue

#size

Instance Method Summary collapse

Methods inherited from Utils::PriorityQueue

#adjust_top, #clear, #initialize, #insert, #pop, #push, #put_heap, #top

Constructor Details

This class inherits a constructor from Ferret::Utils::PriorityQueue

Instance Method Details

#closeObject



11
12
13
14
# File 'lib/ferret/index/segment_merge_queue.rb', line 11

def close()
  @heap.each {|sti| sti.close if sti}
  clear
end

#less_than(rsti1, rsti2) ⇒ Object

**************************************************************************

SegmentMergeQueue Methods

**************************************************************************



10
11
12
13
14
15
16
# File 'ext/segment_merge_queue.c', line 10

def less_than(sti_a, sti_b) 
  if sti_a.term == sti_b.term
    return sti_a.base < sti_b.base
  else
    return sti_a.term < sti_b.term
  end
end