From cc758fef2db97e787b546370d732ca4c9a021bb4 Mon Sep 17 00:00:00 2001 From: edunn Date: Thu, 1 Aug 2024 16:39:57 -0700 Subject: [PATCH] rename noSupersededProduct -> excludeSupersededProducts --- .../api/registry/controllers/ProductsController.java | 6 +++--- .../registry/search/RegistrySearchRequestBuilder.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/service/src/main/java/gov/nasa/pds/api/registry/controllers/ProductsController.java b/service/src/main/java/gov/nasa/pds/api/registry/controllers/ProductsController.java index 85d1fdde..3fc31667 100644 --- a/service/src/main/java/gov/nasa/pds/api/registry/controllers/ProductsController.java +++ b/service/src/main/java/gov/nasa/pds/api/registry/controllers/ProductsController.java @@ -295,7 +295,7 @@ private HashMap getLatestLidVid(PdsProductIdentifier identifier, SearchRequest searchRequest = new RegistrySearchRequestBuilder(this.connectionContext) .matchLid(identifier) .fieldsFromStrings(fields) - .noSupersededProducts() + .excludeSupersededProducts() .build(); // useless to detail here that the HashMap is parameterized @@ -343,7 +343,7 @@ private PdsProductClasses resolveProductClass(PdsProductIdentifier identifier) SearchRequest searchRequest = new RegistrySearchRequestBuilder(this.connectionContext) .matchLid(identifier) .fieldsFromStrings(List.of(PdsProductClasses.getPropertyName())) - .noSupersededProducts() + .excludeSupersededProducts() .build(); SearchResponse searchResponse = this.openSearchClient.search(searchRequest, HashMap.class); @@ -363,7 +363,7 @@ private PdsLidVid resolveLatestLidvid(PdsProductIdentifier identifier) SearchRequest searchRequest = new RegistrySearchRequestBuilder(this.connectionContext) .matchLid(identifier.getLid()) .fieldsFromStrings(List.of()) - .noSupersededProducts() + .excludeSupersededProducts() .build(); SearchResponse searchResponse = this.openSearchClient.search(searchRequest, HashMap.class); diff --git a/service/src/main/java/gov/nasa/pds/api/registry/search/RegistrySearchRequestBuilder.java b/service/src/main/java/gov/nasa/pds/api/registry/search/RegistrySearchRequestBuilder.java index 13d70f64..ab1ed850 100644 --- a/service/src/main/java/gov/nasa/pds/api/registry/search/RegistrySearchRequestBuilder.java +++ b/service/src/main/java/gov/nasa/pds/api/registry/search/RegistrySearchRequestBuilder.java @@ -115,7 +115,7 @@ public BoolQuery.Builder getQueryBuilder() { * @param pageSize - the page size to use for pagination * @param sortFieldNames - the fields by which results are sorted (ascending), from highest to lowest priority * @param searchAfterFieldValues - the values corresponding to the sort fields, for pagination - * @param noSupersededProducts - whether to exclude superseded products from the result set + * @param excludeSupersededProducts - whether to exclude superseded products from the result set */ public RegistrySearchRequestBuilder applyMultipleProductsDefaults( List includeFieldNames, @@ -124,7 +124,7 @@ public RegistrySearchRequestBuilder applyMultipleProductsDefaults( Integer pageSize, List sortFieldNames, List searchAfterFieldValues, - Boolean noSupersededProducts + Boolean excludeSupersededProducts ) throws UnparsableQParamException, SortSearchAfterMismatchException { this .fieldsFromStrings(includeFieldNames) @@ -132,8 +132,8 @@ public RegistrySearchRequestBuilder applyMultipleProductsDefaults( .addKeywordsParam(keywords) .paginate(pageSize, sortFieldNames, searchAfterFieldValues); - if (noSupersededProducts) { - this.noSupersededProducts(); + if (excludeSupersededProducts) { + this.excludeSupersededProducts(); } return this; @@ -358,7 +358,7 @@ public RegistrySearchRequestBuilder addKeywordsParam(List keywords) { * N.B. this does *not* mean the latest version which satisfies other constraints, so application of this constraint * can result in no hits being returned despite valid results existing. */ - public RegistrySearchRequestBuilder noSupersededProducts() { + public RegistrySearchRequestBuilder excludeSupersededProducts() { ExistsQuery supersededByExists = new ExistsQuery.Builder() .field("ops:Provenance/ops:superseded_by")