mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 15:34:17 +01:00
fix: upgrade lucene version
will trigger a full rebuild of the index
This commit is contained in:
parent
ec0acbc5cc
commit
4ee30dde96
4 changed files with 5 additions and 5 deletions
|
|
@ -61,7 +61,7 @@ dependencies {
|
|||
implementation("commons-validator:commons-validator:1.7")
|
||||
|
||||
run {
|
||||
val luceneVersion = "8.9.0"
|
||||
val luceneVersion = "8.11.1" // 9.0.0 requires Java 11
|
||||
implementation("org.apache.lucene:lucene-core:$luceneVersion")
|
||||
implementation("org.apache.lucene:lucene-analyzers-common:$luceneVersion")
|
||||
implementation("org.apache.lucene:lucene-queryparser:$luceneVersion")
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ class LuceneConfiguration(
|
|||
@Bean
|
||||
fun indexAnalyzer() =
|
||||
with(komgaProperties.lucene.indexAnalyzer) {
|
||||
MultiLingualNGramAnalyzer(minGram, maxGram, preserveOriginal).apply { version = Version.LUCENE_8_9_0 }
|
||||
MultiLingualNGramAnalyzer(minGram, maxGram, preserveOriginal).apply { version = Version.LUCENE_8_11_1 }
|
||||
}
|
||||
|
||||
@Bean
|
||||
fun searchAnalyzer() =
|
||||
MultiLingualAnalyzer().apply { version = Version.LUCENE_8_9_0 }
|
||||
MultiLingualAnalyzer().apply { version = Version.LUCENE_8_11_1 }
|
||||
|
||||
@Bean
|
||||
@Profile("test")
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import kotlin.math.ceil
|
|||
import kotlin.time.measureTime
|
||||
|
||||
private val logger = KotlinLogging.logger {}
|
||||
private const val INDEX_VERSION = 2
|
||||
private const val INDEX_VERSION = 3
|
||||
|
||||
@Component
|
||||
class SearchIndexLifecycle(
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class SearchIndexController(
|
|||
} else {
|
||||
logger.info { "Lucene index version: ${luceneHelper.getIndexVersion()}" }
|
||||
when (luceneHelper.getIndexVersion()) {
|
||||
1 -> taskReceiver.rebuildIndex(HIGHEST_PRIORITY)
|
||||
1, 2 -> taskReceiver.rebuildIndex(HIGHEST_PRIORITY)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue