struct

Memo::Search::Result

Inherits Struct < Value < Object

Search result struct

Returns external source IDs (Int64, String, or Bytes), matching what was indexed. source_id may be nil for memo-managed sources (e.g., file indexer).

Constructors

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

Instance methods

chunk_id
Source
hash

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.

Source
internal_source_id
Source
match_count
Source
offset
Source
pair_id
Source
parent_id
Source
read_count
Source
score
Source
size
Source
source_id
Source
source_type
Source
text
Source