From ae4a7873862249dd6e1bce78f6552ddb11354e0d Mon Sep 17 00:00:00 2001 From: Irakli Merabishvili Date: Fri, 24 Jan 2025 17:11:03 +0400 Subject: [PATCH] MCBFF-38: fix search query --- .../folio/circulationbff/service/impl/SearchServiceImpl.java | 2 +- .../org/folio/circulationbff/service/SearchServiceTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/folio/circulationbff/service/impl/SearchServiceImpl.java b/src/main/java/org/folio/circulationbff/service/impl/SearchServiceImpl.java index 41e5f8c..d3872ec 100644 --- a/src/main/java/org/folio/circulationbff/service/impl/SearchServiceImpl.java +++ b/src/main/java/org/folio/circulationbff/service/impl/SearchServiceImpl.java @@ -75,7 +75,7 @@ public class SearchServiceImpl implements SearchService { @Override public SearchInstance findInstanceByItemId(String itemId) { log.info("findInstanceByItemId:: itemId {}", itemId); - String query = String.format("items.id==%s&expandAll=true", itemId); + String query = "items.id==" + itemId; SearchInstances searchResult = searchClient.findInstances(query, true); if (CollectionUtils.isEmpty(searchResult.getInstances())) { return null; diff --git a/src/test/java/org/folio/circulationbff/service/SearchServiceTest.java b/src/test/java/org/folio/circulationbff/service/SearchServiceTest.java index b9d149c..2d3f615 100644 --- a/src/test/java/org/folio/circulationbff/service/SearchServiceTest.java +++ b/src/test/java/org/folio/circulationbff/service/SearchServiceTest.java @@ -52,7 +52,7 @@ void searchInstanceByItemId() { SearchInstances mockSearchResponse = new SearchInstances() .instances(List.of(instance)) .totalRecords(1); - String query = "items.id==" + itemId + "&expandAll=true"; + String query = "items.id==" + itemId; when(searchClient.findInstances(query, true)) .thenReturn(mockSearchResponse);