Class: Mneme::Search::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/mneme/search.rb

Overview

A single search result with enough context for display and drill-down.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#event_idObject (readonly)

the event’s database ID



25
# File 'lib/mneme/search.rb', line 25

Result = Struct.new(:event_id, :session_id, :snippet, :rank, :event_type, keyword_init: true)

#event_typeObject (readonly)

friendly label: human, anima, system, or thought



25
# File 'lib/mneme/search.rb', line 25

Result = Struct.new(:event_id, :session_id, :snippet, :rank, :event_type, keyword_init: true)

#session_idObject (readonly)

the session owning this event



25
# File 'lib/mneme/search.rb', line 25

Result = Struct.new(:event_id, :session_id, :snippet, :rank, :event_type, keyword_init: true)

#snippetObject (readonly)

highlighted excerpt from the matching content



25
# File 'lib/mneme/search.rb', line 25

Result = Struct.new(:event_id, :session_id, :snippet, :rank, :event_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(:event_id, :session_id, :snippet, :rank, :event_type, keyword_init: true)