File tree Expand file tree Collapse file tree
kotlin/com/retrip/map/infra
out/search/elasticsearch/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import org.springframework.batch.core.Job
66import org.springframework.batch.core.Step
77import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing
88import org.springframework.batch.core.job.builder.JobBuilder
9+ import org.springframework.batch.core.launch.support.RunIdIncrementer
910import org.springframework.batch.core.repository.JobRepository
1011import org.springframework.batch.core.step.builder.StepBuilder
1112import org.springframework.beans.factory.annotation.Value
@@ -30,6 +31,7 @@ class MapBatchConfig(
3031 ): Job {
3132 return JobBuilder (jobName, jobRepository)
3233 .start(mapStep)
34+ .incrementer(RunIdIncrementer ()) // 🔥 이 라인 추가
3335 .build()
3436
3537 }
Original file line number Diff line number Diff line change @@ -7,14 +7,19 @@ import jakarta.persistence.Id
77import org.springframework.data.elasticsearch.annotations.Document
88import org.springframework.data.elasticsearch.annotations.Field
99import org.springframework.data.elasticsearch.annotations.FieldType
10+ import org.springframework.data.elasticsearch.annotations.Mapping
11+ import org.springframework.data.elasticsearch.annotations.Setting
1012import java.time.LocalDateTime
1113import java.util.*
1214
1315@Document(indexName = " locations" )
16+ @Setting(settingPath = " elasticsearch/settings/setting.json" )
17+ @Mapping(mappingPath = " elasticsearch/mappings/mapping.json" )
1418data class LocationDocument (
19+
1520 @Id
1621 val id : UUID ,
17- @Field(type = FieldType .Text )
22+ @Field(type = FieldType .Text , analyzer = " korean " )
1823 val name : String ,
1924 @Field(type = FieldType .Keyword )
2025 val category : String ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class ElasticsearchConfig {
1919 val credentialsProvider = BasicCredentialsProvider ()
2020 credentialsProvider.setCredentials(
2121 AuthScope .ANY ,
22- UsernamePasswordCredentials (" elastic" , " 61tkSdZs6lUk2Mfa+nq5 " )
22+ UsernamePasswordCredentials (" elastic" , " test1234 " )
2323 )
2424
2525 val sslContext = SSLContexts .custom()
Original file line number Diff line number Diff line change 1+ {
2+ "properties" : {
3+ "name" : {
4+ "type" : " text" ,
5+ "analyzer" : " korean"
6+ }
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ {
2+ "analysis" : {
3+ "tokenizer" : {
4+ "nori_none" : {
5+ "type" : " nori_tokenizer" ,
6+ "decompound_mode" : " none"
7+ },
8+ "nori_discard" : {
9+ "type" : " nori_tokenizer" ,
10+ "decompound_mode" : " discard"
11+ },
12+ "nori_mixed" : {
13+ "type" : " nori_tokenizer" ,
14+ "decompound_mode" : " mixed"
15+ }
16+ },
17+ "analyzer" : {
18+ "korean" : {
19+ "type" : " nori" }
20+ }
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments