dev change to visual_matches engine
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-02-11 18:12:44 +07:00
parent 6b73d01aeb
commit 6818b74307
2 changed files with 6 additions and 4 deletions
@@ -11,10 +11,10 @@ import java.util.List;
public class SearchApiToYandexResponseMapper {
private final ObjectMapper objectMapper = new ObjectMapper();
public YandexSearchResponse mapToYandexResponse(String searchApiJson, int page, int pageSize) throws IOException {
public YandexSearchResponse mapToYandexResponse(String searchApiJson, int page, int pageSize, String findType) throws IOException {
JsonNode root = objectMapper.readTree(searchApiJson);
JsonNode visualMatches = root.path("visual_matches");
JsonNode visualMatches = root.path(findType);
YandexSearchResponse response = new YandexSearchResponse();
List<YandexSearchResponse.ImageResult> images = new ArrayList<>();