Class: EstraierPure::NodeResult

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/estraierpure.rb

Overview


++ Abstraction of result set from node.


Instance Method Summary collapse

Instance Method Details

#doc_numObject

Get the number of documents. The return value is the number of documents.



397
398
399
# File 'lib/vendor/estraierpure.rb', line 397

def doc_num()
  @docs.length
end

#get_doc(index) ⇒ Object

Get the value of hint information. The return value is a result document object or ‘nil’ if the index is out of bounds.



402
403
404
405
406
# File 'lib/vendor/estraierpure.rb', line 402

def get_doc(index)
  Utility::check_types({ index=>Integer }) if $DEBUG
  return nil if index < 0 || index >= @docs.length
  @docs[index]
end

#hint(key) ⇒ Object

Get the value of hint information. ‘key’ specifies the key of a hint. “VERSION”, “NODE”, “HIT”, “HINT#n”, “DOCNUM”, “WORDNUM”, “TIME”, “LINK#n”, and “VIEW” are provided for keys. The return value is the hint or ‘nil’ if the key does not exist.



411
412
413
414
# File 'lib/vendor/estraierpure.rb', line 411

def hint(key)
  Utility::check_types({ key=>String }) if $DEBUG
  @hints[key]
end