Class: Ferret::Index::Posting
- Inherits:
-
Object
- Object
- Ferret::Index::Posting
- Defined in:
- lib/ferret/index/document_writer.rb
Overview
info about a Term in a doc
Instance Attribute Summary collapse
-
#freq ⇒ Object
Returns the value of attribute freq.
-
#offsets ⇒ Object
Returns the value of attribute offsets.
-
#positions ⇒ Object
Returns the value of attribute positions.
-
#term ⇒ Object
Returns the value of attribute term.
Instance Method Summary collapse
-
#initialize(t, position, offset) ⇒ Posting
constructor
A new instance of Posting.
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
#freq ⇒ Object
Returns the value of attribute freq.
279 280 281 |
# File 'lib/ferret/index/document_writer.rb', line 279 def freq @freq end |
#offsets ⇒ Object
Returns the value of attribute offsets.
279 280 281 |
# File 'lib/ferret/index/document_writer.rb', line 279 def offsets @offsets end |
#positions ⇒ Object
Returns the value of attribute positions.
279 280 281 |
# File 'lib/ferret/index/document_writer.rb', line 279 def positions @positions end |
#term ⇒ Object
Returns the value of attribute term.
279 280 281 |
# File 'lib/ferret/index/document_writer.rb', line 279 def term @term end |