struct Memo::Search::Result

Overview

Search result struct

Defined in:

memo/search.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(chunk_id : Int64, hash : Slice(UInt8), source_type : String, source_id : Int64, pair_id : Int64 | Nil, parent_id : Int64 | Nil, offset : Int32 | Nil, size : Int32, match_count : Int32, read_count : Int32, score : Float64, text : Nil | String = nil) #

[View source]

Instance Method Detail

def chunk_id : Int64 #

[View source]
def hash : Bytes #
Description copied from class Object

Generates an UInt64 hash value for this object.

This method must have the property that a == b implies a.hash == b.hash.

The hash value is used along with == by the Hash class to determine if two objects reference the same hash key.

Subclasses must not override this method. Instead, they must define hash(hasher), though usually the macro def_hash can be used to generate this method.


[View source]
def match_count : Int32 #

[View source]
def offset : Int32 | Nil #

[View source]
def pair_id : Int64 | Nil #

[View source]
def parent_id : Int64 | Nil #

[View source]
def read_count : Int32 #

[View source]
def score : Float64 #

[View source]
def size : Int32 #

[View source]
def source_id : Int64 #

[View source]
def source_type : String #

[View source]
def text : String | Nil #

[View source]