Memo::Search::Result
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)
SourceInstance methods
chunk_id
Sourcehash
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.
internal_source_id
Sourcematch_count
Sourceoffset
Sourcepair_id
Sourceparent_id
Sourceread_count
Sourcescore
Sourcesize
Sourcesource_id
Sourcesource_type
Sourcetext
Source