Skip to content

Commit

Permalink
ALS-6279: re-implement genomic info column listing
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Jul 30, 2024
1 parent 98ff360 commit a21dc0b
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,20 @@ public SearchResults search(@RequestBody QueryRequest searchJson) {
}).collect(Collectors.toMap(Entry::getKey, Entry::getValue)) : allColumns;

// Info Values
Map<String, Map> infoResults = new HashMap<>();
log.warn("Info values no longer supported for this resource");
Map<String, Map> infoResults = new TreeMap<String, Map>();
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<String>() : abstractProcessor.searchInfoConceptValues(infoColumnMeta.getKey(), ""), "continuous",
storeIsNumeric));
}
});

return new SearchResults()
.setResults(
Expand Down

0 comments on commit a21dc0b

Please sign in to comment.