Class: Retreval::ResultDocument

Inherits:
Document
  • Object
show all
Defined in:
lib/retreval/query_result.rb

Overview

A ResultDocument, in contrast to a Document, can also have a score that was determined to compute its rank in an information need. The score will only be output for informational purposes.

Instance Attribute Summary (collapse)

Attributes inherited from Document

#id

Instance Method Summary (collapse)

Methods inherited from Document

#==

Constructor Details

- (ResultDocument) initialize(args)

Creates a new ResultDocument



507
508
509
510
# File 'lib/retreval/query_result.rb', line 507

def initialize(args)
  super(args)
  @score = args[:score]
end

Instance Attribute Details

- (Object) score (readonly)

Returns the value of attribute score



504
505
506
# File 'lib/retreval/query_result.rb', line 504

def score
  @score
end