Class: Mneme::Search::Result
- Inherits:
-
Struct
- Object
- Struct
- Mneme::Search::Result
- Defined in:
- lib/mneme/search.rb
Overview
A single search result with enough context for display and drill-down.
Instance Attribute Summary collapse
-
#message_id ⇒ Object
readonly
the message’s database ID.
-
#message_type ⇒ Object
readonly
friendly label: human, anima, system, or thought.
-
#session_id ⇒ Object
readonly
the session owning this message.
-
#snippet ⇒ Object
readonly
highlighted excerpt from the matching content.
Instance Method Summary collapse
-
#rank(value) ⇒ Object
FTS5 relevance score (lower = more relevant).
Instance Attribute Details
#message_id ⇒ Object (readonly)
the message’s database ID
25 |
# File 'lib/mneme/search.rb', line 25 Result = Struct.new(:message_id, :session_id, :snippet, :rank, :message_type, keyword_init: true) |
#message_type ⇒ Object (readonly)
friendly label: human, anima, system, or thought
25 |
# File 'lib/mneme/search.rb', line 25 Result = Struct.new(:message_id, :session_id, :snippet, :rank, :message_type, keyword_init: true) |
#session_id ⇒ Object (readonly)
the session owning this message
25 |
# File 'lib/mneme/search.rb', line 25 Result = Struct.new(:message_id, :session_id, :snippet, :rank, :message_type, keyword_init: true) |
#snippet ⇒ Object (readonly)
highlighted excerpt from the matching content
25 |
# File 'lib/mneme/search.rb', line 25 Result = Struct.new(:message_id, :session_id, :snippet, :rank, :message_type, keyword_init: true) |
Instance Method Details
#rank=(value) ⇒ Object
FTS5 relevance score (lower = more relevant)
25 |
# File 'lib/mneme/search.rb', line 25 Result = Struct.new(:message_id, :session_id, :snippet, :rank, :message_type, keyword_init: true) |