Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,8 @@ class LuceneSearchEngine(
lineIndex = meta.lineIndex,
snippet = snippet,
score = boostedScore,
rawText = raw
rawText = raw,
isBaseBook = meta.isBaseBook
)
}
// Re-sort by boosted score (descending)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ data class SearchPage(
* @property snippet HTML snippet with highlighted matching terms (contains `<b>` tags)
* @property score Relevance score (higher = more relevant). Includes boosts for base books.
* @property rawText Original unprocessed text content of the line
* @property isBaseBook True if the line belongs to a base book (vs a commentary). Lets callers
* correlate results: anchor each hit on its base line and nest matching commentaries under it.
*/
data class LineHit(
val bookId: Long,
Expand All @@ -70,7 +72,8 @@ data class LineHit(
val lineIndex: Int,
val snippet: String,
val score: Float,
val rawText: String
val rawText: String,
val isBaseBook: Boolean = false
)

/**
Expand Down
Loading