mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02: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")
|
implementation("commons-validator:commons-validator:1.7")
|
||||||
|
|
||||||
run {
|
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-core:$luceneVersion")
|
||||||
implementation("org.apache.lucene:lucene-analyzers-common:$luceneVersion")
|
implementation("org.apache.lucene:lucene-analyzers-common:$luceneVersion")
|
||||||
implementation("org.apache.lucene:lucene-queryparser:$luceneVersion")
|
implementation("org.apache.lucene:lucene-queryparser:$luceneVersion")
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@ class LuceneConfiguration(
|
||||||
@Bean
|
@Bean
|
||||||
fun indexAnalyzer() =
|
fun indexAnalyzer() =
|
||||||
with(komgaProperties.lucene.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
|
@Bean
|
||||||
fun searchAnalyzer() =
|
fun searchAnalyzer() =
|
||||||
MultiLingualAnalyzer().apply { version = Version.LUCENE_8_9_0 }
|
MultiLingualAnalyzer().apply { version = Version.LUCENE_8_11_1 }
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Profile("test")
|
@Profile("test")
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import kotlin.math.ceil
|
||||||
import kotlin.time.measureTime
|
import kotlin.time.measureTime
|
||||||
|
|
||||||
private val logger = KotlinLogging.logger {}
|
private val logger = KotlinLogging.logger {}
|
||||||
private const val INDEX_VERSION = 2
|
private const val INDEX_VERSION = 3
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
class SearchIndexLifecycle(
|
class SearchIndexLifecycle(
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class SearchIndexController(
|
||||||
} else {
|
} else {
|
||||||
logger.info { "Lucene index version: ${luceneHelper.getIndexVersion()}" }
|
logger.info { "Lucene index version: ${luceneHelper.getIndexVersion()}" }
|
||||||
when (luceneHelper.getIndexVersion()) {
|
when (luceneHelper.getIndexVersion()) {
|
||||||
1 -> taskReceiver.rebuildIndex(HIGHEST_PRIORITY)
|
1, 2 -> taskReceiver.rebuildIndex(HIGHEST_PRIORITY)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue