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.



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

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

Instance Attribute Details

#freqObject

Returns the value of attribute freq.



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

def freq
  @freq
end

#offsetsObject

Returns the value of attribute offsets.



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

def offsets
  @offsets
end

#positionsObject

Returns the value of attribute positions.



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

def positions
  @positions
end

#termObject

Returns the value of attribute term.



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

def term
  @term
end