Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALS-6279: re-implement genomic info column listing #114

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading