Skip to content

Commit

Permalink
Merge pull request #240 from Open-MBEE/release/4.0.17
Browse files Browse the repository at this point in the history
Release/4.0.17
  • Loading branch information
HuiJun authored Mar 31, 2023
2 parents 823a299 + 1357519 commit 30751d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,20 @@ private List<ElementJson> performElasticQuery(Set<String> allNodeDocIds, SearchR
sourceBuilder.query(query);
sourceBuilder.size(resultLimit);
searchRequest.source(sourceBuilder);
searchRequest.scroll(TimeValue.timeValueMillis(scrollTimeout));
searchRequest.scroll(TimeValue.timeValueSeconds(scrollTimeout));
SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
String scrollId = null;

do {
for(SearchHit hit : searchResponse.getHits()) {
for (SearchHit hit : searchResponse.getHits()) {
ElementJson ob = parseResult(hit);
if(allNodeDocIds.contains(ob.getDocId())) {
if (allNodeDocIds.contains(ob.getDocId())) {
result.add(ob);
}
}
scrollId = searchResponse.getScrollId();
if (scrollId != null) {
SearchScrollRequest scrollRequest = new SearchScrollRequest(scrollId);
scrollRequest.scroll(TimeValue.timeValueSeconds(scrollTimeout));
searchResponse = client.scroll(scrollRequest, RequestOptions.DEFAULT);
}

Expand Down Expand Up @@ -255,8 +255,6 @@ private Collection<OrderedResult<ElementJson>> filterIndexedElementsUsingDatabas
} else if(showDeletedAsRejected) {
deletedElements.add(new OrderedResult<>(new Rejection(currentJson.getWrapped(), 410, SearchConstants.ELEMENT_DELETED_INFO), currentJson.getOrder()));
}
} else { // node found in DB not found in the index
logger.warn(SearchConstants.POSSIBLE_ELASTIC_DISCREPANCY, n.getNodeId());
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=4.0.16
version=4.0.17
group=org.openmbee.mms

springBootVersion=2.6.7
Expand Down

0 comments on commit 30751d8

Please sign in to comment.