class FastRI::FullTextIndex::Result

Attributes

index[R]
metadata[R]
path[R]
query[R]

Public Class Methods

new(searcher, query, index, path, metadata) click to toggle source
# File lib/fastri/full_text_index.rb, line 15
def initialize(searcher, query, index, path, metadata)
  @searcher = searcher
  @index    = index
  @query    = query
  @path     = path
  @metadata = metadata
end

Public Instance Methods

context(size) click to toggle source
# File lib/fastri/full_text_index.rb, line 23
def context(size)
  @searcher.fetch_data(@index, 2*size+1, -size)
end
text(size) click to toggle source
# File lib/fastri/full_text_index.rb, line 27
def text(size)
  @searcher.fetch_data(@index, size, 0)
end