diff --git a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java index def35e54..6c47f882 100644 --- a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java +++ b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java @@ -146,8 +146,20 @@ public SearchResults search(@RequestBody QueryRequest searchJson) { }).collect(Collectors.toMap(Entry::getKey, Entry::getValue)) : allColumns; // Info Values - Map infoResults = new HashMap<>(); - log.warn("Info values no longer supported for this resource"); + Map infoResults = new TreeMap(); + abstractProcessor.getInfoStoreMeta().stream().forEach(infoColumnMeta -> { + //FileBackedByteIndexedInfoStore store = abstractProcessor.getInfoStore(infoColumn); + String query = searchJson.getQuery().toString(); + String lowerCase = query.toLowerCase(); + boolean storeIsNumeric = infoColumnMeta.isContinuous(); + if (infoColumnMeta.getDescription().toLowerCase().contains(lowerCase) + || infoColumnMeta.getKey().toLowerCase().contains(lowerCase)) { + infoResults.put(infoColumnMeta.getKey(), + ImmutableMap.of("description", infoColumnMeta.getDescription(), "values", + storeIsNumeric ? new ArrayList() : abstractProcessor.searchInfoConceptValues(infoColumnMeta.getKey(), ""), "continuous", + storeIsNumeric)); + } + }); return new SearchResults() .setResults(