diff --git a/apps/dolly-backend/README.md b/apps/dolly-backend/README.md index 5a7cd6e8460..bfef40505da 100644 --- a/apps/dolly-backend/README.md +++ b/apps/dolly-backend/README.md @@ -40,3 +40,9 @@ DOCKER_HOST=unix://${HOME}/.colima/default/docker.sock TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock TESTCONTAINERS_RYUK_DISABLED=true ``` + +For å kjøre lokalt med elastic search: + +``` +docker run -d --name es762 -p 9200:9200 -e "discovery.type=single-node" elasticsearch:7.6.2 +``` \ No newline at end of file diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 2388a0bb225..1096192a220 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -86,8 +86,13 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch' implementation 'org.springframework.retry:spring-retry:2.0.0' +// implementation 'org.opensearch.client:spring-data-opensearch:1.1.0' +// implementation 'com.fasterxml.jackson.core:jackson-core:2.15.2' +// implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.16.1' + implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'org.springframework.boot:spring-boot-starter-cache' implementation 'com.github.ben-manes.caffeine:caffeine' diff --git a/apps/dolly-backend/config.test.yml b/apps/dolly-backend/config.test.yml index 44a619bad94..4f0207b495c 100644 --- a/apps/dolly-backend/config.test.yml +++ b/apps/dolly-backend/config.test.yml @@ -71,6 +71,9 @@ spec: enabled: true tenant: nav.no image: {{image}} + openSearch: + instance: dolly-bestilling-test + access: admin env: - name: SPRING_PROFILES_ACTIVE value: dev diff --git a/apps/dolly-backend/config.yml b/apps/dolly-backend/config.yml index bc6f805448a..3ab2704581d 100644 --- a/apps/dolly-backend/config.yml +++ b/apps/dolly-backend/config.yml @@ -78,6 +78,9 @@ spec: enabled: true tenant: nav.no image: {{image}} + openSearch: + instance: dolly-bestilling + access: admin env: - name: SPRING_PROFILES_ACTIVE value: prod diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/DollyBestillingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/DollyBestillingService.java index 5d815926258..da60070956f 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/DollyBestillingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/DollyBestillingService.java @@ -97,6 +97,7 @@ protected RsDollyBestillingRequest getDollyBestillingRequest(Bestilling bestilli bestKriterier.setNavSyntetiskIdent(bestilling.getNavSyntetiskIdent()); bestKriterier.setEnvironments(getEnvironments(bestilling.getMiljoer())); bestKriterier.setBeskrivelse(bestilling.getBeskrivelse()); + return bestKriterier; } catch (JsonProcessingException e) { diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettGruppeService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettGruppeService.java index ba2d909c554..3ee8f24f5ee 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettGruppeService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettGruppeService.java @@ -10,7 +10,6 @@ import no.nav.dolly.bestilling.tpsmessagingservice.service.TpsPersonService; import no.nav.dolly.domain.jpa.Bestilling; import no.nav.dolly.domain.jpa.BestillingProgress; -import no.nav.dolly.domain.resultset.RsDollyBestilling; import no.nav.dolly.errorhandling.ErrorStatusDecoder; import no.nav.dolly.metrics.CounterCustomRegistry; import no.nav.dolly.repository.IdentRepository.GruppeBestillingIdent; @@ -105,7 +104,7 @@ public void executeAsync(Bestilling bestilling) { .flatMapSequential(cobestilling -> createBestilling(bestilling, cobestilling) .filter(bestillingRequest -> bestillingRequest.getId() == isFirstBestilling(coBestillinger, cobestilling.getIdent()) || - RsDollyBestilling.isNonEmpty(bestillingRequest)) + bestillingRequest.isNonEmpty()) .doOnNext(request -> log.info("Startet gjenopprett bestilling {} for ident: {}", request.getId(), testident.getIdent())) .flatMapSequential(bestillingRequest -> Flux.concat( diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettIdentService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettIdentService.java index c7705b7a5ec..a723e92a33c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettIdentService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettIdentService.java @@ -10,7 +10,6 @@ import no.nav.dolly.bestilling.tpsmessagingservice.service.TpsPersonService; import no.nav.dolly.domain.jpa.Bestilling; import no.nav.dolly.domain.jpa.BestillingProgress; -import no.nav.dolly.domain.resultset.RsDollyBestilling; import no.nav.dolly.domain.resultset.RsDollyBestillingRequest; import no.nav.dolly.errorhandling.ErrorStatusDecoder; import no.nav.dolly.metrics.CounterCustomRegistry; @@ -106,7 +105,7 @@ public void executeAsync(Bestilling bestilling) { .filter(cobestilling -> ident.equals(cobestilling.getIdent())) .flatMap(cobestilling -> createBestilling(bestilling, cobestilling) .filter(bestillingRequest -> countEmptyBestillinger.getAndIncrement() == 0 || - RsDollyBestilling.isNonEmpty(bestillingRequest)) + bestillingRequest.isNonEmpty()) .doOnNext(request -> log.info("Startet gjenopprett bestilling {} for ident: {}", request.getId(), testident.getIdent())) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchConfig.java new file mode 100644 index 00000000000..919334baff4 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchConfig.java @@ -0,0 +1,34 @@ +package no.nav.dolly.config; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.data.elasticsearch.client.ClientConfiguration; +import org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration; + +import java.time.Duration; + +@Profile({"prod", "dev"}) +@Configuration +public class ElasticSearchConfig extends ReactiveElasticsearchConfiguration { + + @Value("${OPEN_SEARCH_USERNAME}") + private String username; + + @Value("${OPEN_SEARCH_PASSWORD}") + private String password; + + @Value("${OPEN_SEARCH_URI}") + private String uri; + + @Override + public ClientConfiguration clientConfiguration() { + return ClientConfiguration.builder() + .connectedTo(uri.replace("https://", "")) + .usingSsl() + .withBasicAuth(username, password) + .withConnectTimeout(Duration.ofSeconds(10)) + .withSocketTimeout(Duration.ofSeconds(5)) + .build(); + } +} \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchLocalConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchLocalConfig.java new file mode 100644 index 00000000000..94648b36a21 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/ElasticSearchLocalConfig.java @@ -0,0 +1,24 @@ +package no.nav.dolly.config; + + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.data.elasticsearch.client.ClientConfiguration; +import org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration; +import org.springframework.data.elasticsearch.config.EnableElasticsearchAuditing; +import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; + +@Profile("local") +@Configuration +@EnableElasticsearchRepositories +@EnableElasticsearchAuditing +public class ElasticSearchLocalConfig extends ReactiveElasticsearchConfiguration { + + @Override + public ClientConfiguration clientConfiguration() { + return ClientConfiguration.builder() + .connectedTo("localhost:9200") + .usingSsl() + .build(); + } +} \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java index 46bc8018e3c..2ba920f72d6 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java @@ -111,14 +111,15 @@ public List getInstdata() { return instdata; } - public static boolean isNonEmpty(RsDollyBestilling bestilling) { + @JsonIgnore + public boolean isNonEmpty() { return Arrays.stream(RsDollyBestilling.class.getMethods()) .filter(method -> "get".equals(method.getName().substring(0, 3))) .filter(method -> !EXCLUDE_METHODS.contains(method.getName())) .anyMatch(method -> { try { - var object = method.invoke(bestilling); + var object = method.invoke(this); return nonNull(object) && (!(object instanceof List) || !((List) object).isEmpty()); } catch (IllegalAccessException | InvocationTargetException e) { return true; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/BestillingElasticRepository.java b/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/BestillingElasticRepository.java new file mode 100644 index 00000000000..d5b1df4c683 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/BestillingElasticRepository.java @@ -0,0 +1,7 @@ +package no.nav.dolly.elastic; + +import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; + +public interface BestillingElasticRepository extends ElasticsearchRepository { + +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java new file mode 100644 index 00000000000..4da7be39406 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java @@ -0,0 +1,148 @@ +package no.nav.dolly.elastic; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import no.nav.dolly.domain.resultset.aareg.RsAareg; +import no.nav.dolly.domain.resultset.arenaforvalter.Arenadata; +import no.nav.dolly.domain.resultset.breg.RsBregdata; +import no.nav.dolly.domain.resultset.dokarkiv.RsDokarkiv; +import no.nav.dolly.domain.resultset.histark.RsHistark; +import no.nav.dolly.domain.resultset.inntektsmeldingstub.RsInntektsmelding; +import no.nav.dolly.domain.resultset.inntektstub.InntektMultiplierWrapper; +import no.nav.dolly.domain.resultset.inst.RsInstdata; +import no.nav.dolly.domain.resultset.kontoregister.BankkontoData; +import no.nav.dolly.domain.resultset.krrstub.RsDigitalKontaktdata; +import no.nav.dolly.domain.resultset.medl.RsMedl; +import no.nav.dolly.domain.resultset.pdldata.PdlPersondata; +import no.nav.dolly.domain.resultset.pensjon.PensjonData; +import no.nav.dolly.domain.resultset.sigrunstub.RsLignetInntekt; +import no.nav.dolly.domain.resultset.sigrunstub.RsPensjonsgivendeForFolketrygden; +import no.nav.dolly.domain.resultset.skjerming.RsSkjerming; +import no.nav.dolly.domain.resultset.sykemelding.RsSykemelding; +import no.nav.dolly.domain.resultset.tpsmessagingservice.RsTpsMessaging; +import no.nav.dolly.domain.resultset.udistub.model.RsUdiPerson; +import no.nav.testnav.libs.dto.arbeidsplassencv.v1.ArbeidsplassenCVDTO; +import org.springframework.data.annotation.Id; +import org.springframework.data.domain.Persistable; +import org.springframework.data.elasticsearch.annotations.Document; +import org.springframework.data.elasticsearch.annotations.Field; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static java.util.Objects.isNull; + +@Document(indexName = "bestilling") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class ElasticBestilling implements Persistable { + + @JsonIgnore + @Id + private String id; + + @Field + private Set environments; + @Field + private String malBestillingNavn; + @Field + private PdlPersondata pdldata; + @Field + private RsDigitalKontaktdata krrstub; + @Field + private RsMedl medl; + @Field + private List instdata; + @Field + private List aareg; + @Field + private List sigrunstub; + @Field + private List sigrunstubPensjonsgivende; + @Field + private InntektMultiplierWrapper inntektstub; + @Field + private Arenadata arenaforvalter; + @Field + private RsUdiPerson udistub; + @Field + private PensjonData pensjonforvalter; + @Field + private RsInntektsmelding inntektsmelding; + @Field + private RsBregdata brregstub; + @Field + private RsDokarkiv dokarkiv; + @Field + private RsHistark histark; + @Field + private RsSykemelding sykemelding; + @Field + private RsTpsMessaging tpsMessaging; + @Field + private BankkontoData bankkonto; + @Field + private RsSkjerming skjerming; + @Field + private ArbeidsplassenCVDTO arbeidsplassenCV; + @Field + private List identer; + + public List getAareg() { + if (isNull(aareg)) { + aareg = new ArrayList<>(); + } + return aareg; + } + + public Set getEnvironments() { + if (isNull(environments)) { + environments = new HashSet<>(); + } + return environments; + } + + public List getSigrunstub() { + if (isNull(sigrunstub)) { + sigrunstub = new ArrayList<>(); + } + return sigrunstub; + } + + public List getSigrunstubPensjonsgivende() { + if (isNull(sigrunstubPensjonsgivende)) { + sigrunstubPensjonsgivende = new ArrayList<>(); + } + return sigrunstubPensjonsgivende; + } + + public List getInstdata() { + if (isNull(instdata)) { + instdata = new ArrayList<>(); + } + return instdata; + } + + public List getIdenter() { + if (isNull(identer)) { + identer = new ArrayList<>(); + } + return identer; + } + + @Override + @JsonIgnore + public boolean isNew() { + + return true; + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/properties/CredentialsProps.java b/apps/dolly-backend/src/main/java/no/nav/dolly/properties/CredentialsProps.java deleted file mode 100644 index b680aeca908..00000000000 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/properties/CredentialsProps.java +++ /dev/null @@ -1,40 +0,0 @@ -package no.nav.dolly.properties; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -import static no.nav.dolly.properties.Environment.PREPROD; - -@Getter -@Setter -@Configuration -@ConfigurationProperties(prefix = "credentials") -public class CredentialsProps { - - private Preprod preprod = new Preprod(); - private Test test = new Test(); - - public String getUsername(Environment env) { - return env == PREPROD ? this.getPreprod().getUsername() : this.getTest().getUsername(); - } - - public String getPassword(Environment env) { - return env == PREPROD ? this.getPreprod().getPassword() : this.getTest().getPassword(); - } - - @Getter - @Setter - public static class Preprod { - private String username; - private String password; - } - - @Getter - @Setter - public static class Test { - private String username; - private String password; - } -} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/properties/Environment.java b/apps/dolly-backend/src/main/java/no/nav/dolly/properties/Environment.java deleted file mode 100644 index cf4aa8ccf2d..00000000000 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/properties/Environment.java +++ /dev/null @@ -1,5 +0,0 @@ -package no.nav.dolly.properties; - -public enum Environment { - PREPROD, TEST; -} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/properties/JiraProps.java b/apps/dolly-backend/src/main/java/no/nav/dolly/properties/JiraProps.java deleted file mode 100644 index 13097c9ab6b..00000000000 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/properties/JiraProps.java +++ /dev/null @@ -1,17 +0,0 @@ -package no.nav.dolly.properties; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -@Getter -@Setter -@Configuration -@ConfigurationProperties(prefix = "jira") -public class JiraProps { - - private String host; - private String username; - private String password; -} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java index 3c97397b790..62824d8bdc9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java @@ -5,12 +5,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MapperFacade; import no.nav.dolly.domain.jpa.Bestilling; import no.nav.dolly.domain.jpa.BestillingKontroll; import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.domain.jpa.Bruker; import no.nav.dolly.domain.jpa.Testgruppe; -import no.nav.dolly.domain.jpa.Testident; import no.nav.dolly.domain.resultset.BestilteKriterier; import no.nav.dolly.domain.resultset.RsDollyBestilling; import no.nav.dolly.domain.resultset.RsDollyBestillingLeggTilPaaGruppe; @@ -19,6 +19,8 @@ import no.nav.dolly.domain.resultset.aareg.RsAareg; import no.nav.dolly.domain.resultset.aareg.RsOrganisasjon; import no.nav.dolly.domain.resultset.entity.bestilling.RsBestillingFragment; +import no.nav.dolly.elastic.BestillingElasticRepository; +import no.nav.dolly.elastic.ElasticBestilling; import no.nav.dolly.exceptions.ConstraintViolationException; import no.nav.dolly.exceptions.DollyFunctionalException; import no.nav.dolly.exceptions.NotFoundException; @@ -75,6 +77,8 @@ public class BestillingService { private final TestgruppeRepository testgruppeRepository; private final BrukerService brukerService; private final GetUserInfo getUserInfo; + private final BestillingElasticRepository bestillingElasticRepository; + private final MapperFacade mapperFacade; public Bestilling fetchBestillingById(Long bestillingId) { return bestillingRepository.findById(bestillingId) @@ -201,12 +205,12 @@ public Consumer cleanBestilling() { @Transactional public Bestilling saveBestilling(RsDollyUpdateRequest request, String ident) { - Testident testident = identRepository.findByIdent(ident) + var testident = identRepository.findByIdent(ident) .orElseThrow(() -> new NotFoundException(format("Testident %s ble ikke funnet", ident))); var bruker = fetchOrCreateBruker(); fixAaregAbstractClassProblem(request.getAareg()); - Bestilling bestilling = Bestilling.builder() + var bestilling = Bestilling.builder() .gruppe(testident.getTestgruppe()) .ident(ident) .antallIdenter(1) @@ -220,6 +224,7 @@ public Bestilling saveBestilling(RsDollyUpdateRequest request, String ident) { if (isNotBlank(request.getMalBestillingNavn())) { bestillingMalService.saveBestillingMal(bestilling, request.getMalBestillingNavn(), bruker); } + saveBestillingToElasticServer(request); return saveBestillingToDB(bestilling); } @@ -243,6 +248,7 @@ public Bestilling saveBestilling(Long gruppeId, RsDollyBestilling request, Integ if (isNotBlank(request.getMalBestillingNavn())) { bestillingMalService.saveBestillingMal(bestilling, request.getMalBestillingNavn(), bruker); } + saveBestillingToElasticServer(request); return saveBestillingToDB(bestilling); } @@ -329,6 +335,7 @@ public Bestilling saveBestilling(Long gruppeId, RsDollyImportFraPdlRequest reque if (isNotBlank(request.getMalBestillingNavn())) { bestillingMalService.saveBestillingMal(bestilling, request.getMalBestillingNavn(), bruker); } + saveBestillingToElasticServer(request); return saveBestillingToDB(bestilling); } @@ -339,6 +346,7 @@ public Bestilling saveBestilling(Long gruppeId, RsDollyBestillingLeggTilPaaGrupp var size = identRepository.countByTestgruppe(gruppeId); log.info("Antall testidenter {} i gruppe {} ", size, gruppeId); fixAaregAbstractClassProblem(request.getAareg()); + saveBestillingToElasticServer(request); return saveBestillingToDB( Bestilling.builder() .gruppe(gruppe) @@ -441,4 +449,11 @@ private static void fixAaregAbstractClassProblem(List aaregdata) { } }); } + + private void saveBestillingToElasticServer(RsDollyBestilling request) { + + if (request.isNonEmpty()) { + bestillingElasticRepository.save(mapperFacade.map(request, ElasticBestilling.class)); + } + } } \ No newline at end of file diff --git a/apps/oppsummeringsdokument-service/config.yml b/apps/oppsummeringsdokument-service/config.yml index eadb8d1832e..4ba7921c11f 100644 --- a/apps/oppsummeringsdokument-service/config.yml +++ b/apps/oppsummeringsdokument-service/config.yml @@ -37,7 +37,6 @@ spec: outbound: external: - host: aareg-synt-services-proxy.dev-fss-pub.nais.io - - host: elastic-dolly-testdata-gjeter-nav-dev.aivencloud.com - host: opensearch-dolly-testdata-gjeter-nav-dev.aivencloud.com openSearch: instance: testdata-gjeter diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java index 89a2ba7fb3d..6e1b9758d5c 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java @@ -9,7 +9,6 @@ import no.nav.testnav.apps.oppsummeringsdokumentservice.repository.OppsummeringsdokumentRepository; import no.nav.testnav.apps.oppsummeringsdokumentservice.repository.model.OppsummeringsdokumentModel; import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.Populasjon; -import org.opensearch.client.RestHighLevelClient; import org.opensearch.data.client.orhlc.NativeSearchQueryBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; @@ -39,7 +38,6 @@ public class OppsummeringsdokumentAdapter { private final ObjectMapper objectMapper; private final OppsummeringsdokumentRepository repository; private final ElasticsearchOperations operations; - private final RestHighLevelClient client; private final AaregSyntConsumer aaregSyntConsumer; public void deleteAllBy(String miljo, Populasjon populasjon) {