Skip to content
Merged
Show file tree
Hide file tree
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 @@ -75,12 +75,16 @@ protected void startSingleThread(LinkedBlockingDeque<String> queue) {
continue;
}

indexDocuments(response.getResults());

// Convert to derived documents first (consumes transport-only fields)
List<SequenceSummaryDocument> sequenceDocs = sequenceSummaryConverter.convert(response.getResults());
indexDocuments(sequenceDocs, CurationView.SequenceSummaryDocument.class);

List<AlleleSearchResultDocument> searchDocs = alleleSearchResultConverter.convert(response.getResults());

// Strip fields only needed by derived documents before indexing to ES
response.getResults().forEach(AlleleSummaryDocument::removeTransportFields);

// Index all document types
indexDocuments(response.getResults());
indexDocuments(sequenceDocs, CurationView.SequenceSummaryDocument.class);
indexDocuments(searchDocs);
} catch (Exception e) {
log.error("Error while indexing...", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
if (doc.getDiseasesAgrSlim() != null && !doc.getDiseasesAgrSlim().isEmpty()) {
searchDoc.setDiseasesAgrSlim(new ArrayList<>(doc.getDiseasesAgrSlim()));
}
if (doc.getDiseasesWithParents() != null && !doc.getDiseasesWithParents().isEmpty()) {
searchDoc.setDiseasesWithParents(new ArrayList<>(doc.getDiseasesWithParents()));
}

if (doc.getConstructExpressedComponents() != null && !doc.getConstructExpressedComponents().isEmpty()) {
searchDoc.setConstructExpressedComponent(doc.getConstructExpressedComponents());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public AlleleSearchResultDocument() {
private List<String> genes;
private List<String> diseases;
private List<String> diseasesAgrSlim;
private List<String> diseasesWithParents;
private List<String> phenotypeStatements;
private String globalId;
private String localId;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<curation.version>v0.47.9</curation.version>
<curation.version>v0.47.12</curation.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
Loading