SearchRepository.enrichWithSpeakerAndSubject is a no-op — speaker/subject names never joined onto search results #134

Closed
opened 2026-08-13 02:57:25 +00:00 by Mark · 0 comments
Owner

SearchRepository.enrichWithSpeakerAndSubject() (app/src/main/java/com/voicetranscriber/data/repository/SearchRepository.kt) exists as a public method but returns the input unchanged:

suspend fun enrichWithSpeakerAndSubject(
    results: List<SemanticSearchResult>
): List<SemanticSearchResult> {
    return results
}

What works

  • SemanticSearchResult data model exists with segment, relevanceScore, speakerName, subjectName fields
  • speakerRepository.getAllSpeakersList() and subjectRepository.getAllSubjectsList() are available with working data
  • The FTS-based semantic search pipeline works
  • LLM re-ranking via LLMReranker works

What is missing

  1. enrichWithSpeakerAndSubject never looks up speaker names or subject names from the repositories
  2. The SemanticSearchResult objects returned by search have null/empty speakerName and subjectName even when the underlying segments have speakerId/subjectId set
  3. No tests exist for this enrichment path

Impact

Search results in the UI don't show speaker names or subject labels alongside transcript segments, making it harder to identify who said what in search results. The data is available in the database - the join just needs to be wired up.

Acceptance

  1. For each SemanticSearchResult, look up the speaker name via speakerRepository.getSpeakerById(segment.speakerId) and subject name via subjectRepository.getSubjectById(segment.subjectId)
  2. Populate speakerName and subjectName on the result
  3. Add unit tests for the enrichment path
`SearchRepository.enrichWithSpeakerAndSubject()` (app/src/main/java/com/voicetranscriber/data/repository/SearchRepository.kt) exists as a public method but returns the input unchanged: ```kotlin suspend fun enrichWithSpeakerAndSubject( results: List<SemanticSearchResult> ): List<SemanticSearchResult> { return results } ``` ## What works - `SemanticSearchResult` data model exists with segment, relevanceScore, speakerName, subjectName fields - `speakerRepository.getAllSpeakersList()` and `subjectRepository.getAllSubjectsList()` are available with working data - The FTS-based semantic search pipeline works - LLM re-ranking via `LLMReranker` works ## What is missing 1. `enrichWithSpeakerAndSubject` never looks up speaker names or subject names from the repositories 2. The `SemanticSearchResult` objects returned by search have null/empty speakerName and subjectName even when the underlying segments have speakerId/subjectId set 3. No tests exist for this enrichment path ## Impact Search results in the UI don't show speaker names or subject labels alongside transcript segments, making it harder to identify who said what in search results. The data is available in the database - the join just needs to be wired up. ## Acceptance 1. For each `SemanticSearchResult`, look up the speaker name via `speakerRepository.getSpeakerById(segment.speakerId)` and subject name via `subjectRepository.getSubjectById(segment.subjectId)` 2. Populate `speakerName` and `subjectName` on the result 3. Add unit tests for the enrichment path
Mark 2026-08-14 03:10:55 +00:00
Sign in to join this conversation.
No description provided.