From ec3b37226be33e9c104780acdbc350f769435e15 Mon Sep 17 00:00:00 2001 From: Newatia Date: Mon, 7 Nov 2022 16:30:37 -0500 Subject: [PATCH] export and facet --- .../controllers/ApplicationController.java | 16 ++++++++++++++++ .../ApplicationIngredientIndexValueMaker.java | 8 +++++++- .../application/models/Application.java | 2 ++ .../src/main/resources/applications-core.conf | 16 ++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java index f27bdf9..e628034 100644 --- a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java +++ b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/controllers/ApplicationController.java @@ -12,15 +12,19 @@ import gov.nih.ncats.common.util.Unchecked; import gsrs.DefaultDataSourceConfig; +import gsrs.GsrsFactoryConfiguration; import gsrs.autoconfigure.GsrsExportConfiguration; import gsrs.controller.*; import gsrs.controller.hateoas.HttpRequestHolder; import gsrs.legacy.LegacyGsrsSearchService; +import gsrs.module.substance.SubstanceEntityServiceImpl; import gsrs.repository.ETagRepository; import gsrs.service.EtagExportGenerator; import gsrs.service.ExportService; import gsrs.service.GsrsEntityService; import ix.core.models.ETag; +import ix.core.search.SearchOptions; +import ix.core.search.text.TextIndexer; import ix.ginas.exporters.ExportMetaData; import ix.ginas.exporters.ExportProcess; import ix.ginas.exporters.Exporter; @@ -84,6 +88,9 @@ public class ApplicationController extends EtagLegacySearchEntityController getEntityService() { @@ -234,6 +241,15 @@ public ResponseEntity findCenterBySubstanceKey(@PathVariable("substanceK } */ + @Override + public SearchOptions instrumentSearchOptions(SearchOptions so) { + + so= super.instrumentSearchOptions(so); + so.addDateRangeFacet("root_submitDate"); + + return so; + } + public JsonNode injectSubstanceBySubstanceKey(String substanceKey) { JsonNode actualObj = null; diff --git a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/indexers/ApplicationIngredientIndexValueMaker.java b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/indexers/ApplicationIngredientIndexValueMaker.java index e45d8d8..ac7d11c 100644 --- a/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/indexers/ApplicationIngredientIndexValueMaker.java +++ b/gsrs-module-applications-spring-boot-autoconfigure/src/main/java/gov/hhs/gsrs/application/application/indexers/ApplicationIngredientIndexValueMaker.java @@ -75,9 +75,15 @@ public void createIndexableValues(Application application, Consumer