Skip to content

Commit 0f780eb

Browse files
authored
SCRUM-5829 get variant type and moelcular consequence se the same jso… (#1538)
* SCRUM-5829 get variant type and moelcular consequence se the same json attribute names as the HTP variants * rename attributes
1 parent 546290d commit 0f780eb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

agr_java_core/src/main/java/org/alliancegenome/core/variant/converters/AlleleSearchResultConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
104104
.distinct()
105105
.toList();
106106
if (!variantTypes.isEmpty()) {
107-
searchDoc.setVariantTypes(variantTypes);
107+
searchDoc.setVariantType(variantTypes);
108108
}
109109

110110
Set<String> consequences = new HashSet<>();
@@ -129,7 +129,7 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
129129
}
130130
}
131131
if (!consequences.isEmpty()) {
132-
searchDoc.setMolecularConsequences(consequences);
132+
searchDoc.setMolecularConsequence(consequences);
133133
}
134134
}
135135

agr_java_core/src/main/java/org/alliancegenome/es/index/site/dao/SearchDAO.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public Long performCountQuery(QueryBuilder query) {
3030

3131
searchSourceBuilder.query(query);
3232
searchSourceBuilder.size(0);
33+
searchSourceBuilder.trackTotalHits(true);
3334

3435
SearchRequest searchRequest = new SearchRequest(ConfigHelper.getEsIndex());
3536
searchRequest.source(searchSourceBuilder);

agr_java_core/src/main/java/org/alliancegenome/es/model/AlleleSearchResultDocument.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public AlleleSearchResultDocument() {
2929
private String species;
3030
private Double popularity;
3131
private String alterationType;
32-
private List<String> variantTypes;
33-
private Set<String> molecularConsequences;
32+
private List<String> variantType;
33+
private Set<String> molecularConsequence;
3434
private Set<String> constructExpressedComponent;
3535
private Set<String> constructRegulatoryRegion;
3636
private Set<String> constructKnockdownComponent;

0 commit comments

Comments
 (0)