Pull request #56: RED-4843: Fixed datetime conversion
Merge in RED/search-service from RED-4843 to master * commit 'd58ac6217dba091320eed866485ebe844e1404a7': RED-4843: Fixed datetime conversion
This commit is contained in:
commit
c66f06c090
@ -45,6 +45,11 @@
|
||||
<artifactId>metric-commons</artifactId>
|
||||
</dependency>
|
||||
<!-- other external -->
|
||||
<dependency>
|
||||
<!-- this dependency is necessary to work with java8 zoned timestamps -->
|
||||
<groupId>com.iqser.red.commons</groupId>
|
||||
<artifactId>jackson-commons</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.opensearch.client</groupId>
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
package com.iqser.red.service.search.v1.server;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import com.iqser.red.commons.jackson.ObjectMapperFactory;
|
||||
import com.iqser.red.commons.spring.DefaultWebMvcConfiguration;
|
||||
import com.iqser.red.service.search.v1.server.client.ElasticsearchClient;
|
||||
import com.iqser.red.service.search.v1.server.client.FileStatusClient;
|
||||
@ -14,6 +18,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
import io.micrometer.core.aop.TimedAspect;
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
@ -43,4 +48,11 @@ public class Application {
|
||||
return new TimedAspect(registry);
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public ObjectMapper objectMapper(){
|
||||
return ObjectMapperFactory.create();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import java.time.OffsetDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@ -18,6 +19,7 @@ public class IndexDocument implements Serializable {
|
||||
private String dossierId;
|
||||
private String fileId;
|
||||
private String filename;
|
||||
|
||||
private OffsetDateTime date;
|
||||
private String assignee;
|
||||
private boolean dossierDeleted;
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "text",
|
||||
"term_vector": "with_positions_offsets"
|
||||
},
|
||||
"indexTime": {
|
||||
"date": {
|
||||
"type": "date"
|
||||
},
|
||||
"assignee": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user