mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 07:23:34 +01:00
parent
3448140f2d
commit
817c2939b0
2 changed files with 4 additions and 3 deletions
|
|
@ -44,6 +44,7 @@ fun BookDto.toDocument() =
|
|||
fun SeriesDto.toDocument() =
|
||||
Document().apply {
|
||||
add(TextField("title", metadata.title, Field.Store.NO))
|
||||
if (metadata.titleSort != metadata.title) add(TextField("title", metadata.titleSort, Field.Store.NO))
|
||||
add(TextField("publisher", metadata.publisher, Field.Store.NO))
|
||||
add(TextField("status", metadata.status, Field.Store.NO))
|
||||
add(TextField("reading_direction", metadata.readingDirection, Field.Store.NO))
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class SearchIndexLifecycleTest(
|
|||
}
|
||||
|
||||
seriesMetadataRepository.findById(series.id).let {
|
||||
seriesMetadataRepository.update(it.copy(title = "updated"))
|
||||
seriesMetadataRepository.update(it.copy(title = "updated", titleSort = "updated"))
|
||||
}
|
||||
mockEventPublisher.publishEvent(DomainEvent.SeriesUpdated(series))
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ class SearchIndexLifecycleTest(
|
|||
|
||||
@Test
|
||||
fun `given an entity when updating then it is updated in the index`() {
|
||||
val readList = org.gotson.komga.domain.model.ReadList("readlist")
|
||||
val readList = ReadList("readlist")
|
||||
readListLifecycle.addReadList(readList)
|
||||
|
||||
luceneHelper.searchEntitiesIds("readlist", LuceneEntity.ReadList).let { found ->
|
||||
|
|
@ -304,7 +304,7 @@ class SearchIndexLifecycleTest(
|
|||
|
||||
@Test
|
||||
fun `given an entity when deleting then it is removed from the index`() {
|
||||
val readList = org.gotson.komga.domain.model.ReadList("readlist")
|
||||
val readList = ReadList("readlist")
|
||||
readListLifecycle.addReadList(readList)
|
||||
|
||||
luceneHelper.searchEntitiesIds("readlist", LuceneEntity.ReadList).let { found ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue