Class: Ferret::Index::Posting

Inherits:
Object
  • Object
show all
Defined in:
lib/ferret/index/document_writer.rb

Overview

info about a Term in a doc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(t, position, offset) ⇒ Posting

Returns a new instance of Posting.



281
282
283
284
285
286
# File 'lib/ferret/index/document_writer.rb', line 281

def initialize(t, position, offset) 
  @term = t
  @freq = 1
  @positions = [position]
  @offsets = [offset]
end

Instance Attribute Details

#freqObject

Returns the value of attribute freq.



279
280
281
# File 'lib/ferret/index/document_writer.rb', line 279

def freq
  @freq
end

#offsetsObject

Returns the value of attribute offsets.



279
280
281
# File 'lib/ferret/index/document_writer.rb', line 279

def offsets
  @offsets
end

#positionsObject

Returns the value of attribute positions.



279
280
281
# File 'lib/ferret/index/document_writer.rb', line 279

def positions
  @positions
end

#termObject

Returns the value of attribute term.



279
280
281
# File 'lib/ferret/index/document_writer.rb', line 279

def term
  @term
end