Service Layer medium complexity mobile
2
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Handles full-text search across contacts and notes using the local SQLite FTS5 index as the primary source and a debounced REST API call to `/api/v1/contacts?q=` as a fallback when the local index is stale. Returns ranked, de-duplicated results that merge contact matches with note content matches referencing the same contact.

Feature: Contact List & Search

search-service

Responsibilities

  • Execute FTS5 full-text search against local SQLite index
  • Detect index staleness and fall back to remote API search
  • Debounce incoming queries to avoid redundant processing
  • Merge and rank contact and note search results
  • Return highlighted match snippets for display in cards

Interfaces

search(String query, SearchScope scope)
searchContacts(String query)
searchNotes(String query)
searchAll(String query)
cancelActiveSearch()
getSearchSuggestions(String partial)
clearSearchHistory()
isIndexStale()

Relationships

Dependencies (2)

Components this component depends on

Related Data Entities (2)

Data entities managed by this component