Skip to content

Commit

Permalink
feat(lineage): Apply search flags to scroll query in LineageSearchSer…
Browse files Browse the repository at this point in the history
…vice (#8518)

Co-authored-by: Indy Prentice <[email protected]>
  • Loading branch information
iprentic and Indy Prentice authored Jul 29, 2023
1 parent 4b32e9a commit e09a2e6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ public LineageScrollResult scrollAcrossLineage(@Nonnull Urn sourceUrn, @Nonnull
private LineageScrollResult getScrollResultInBatches(List<LineageRelationship> lineageRelationships,
@Nonnull String input, @Nullable Filter inputFilters, @Nullable SortCriterion sortCriterion, @Nullable String scrollId,
@Nonnull String keepAlive, int size, @Nonnull SearchFlags searchFlags) {
final SearchFlags finalFlags = applyDefaultSearchFlags(searchFlags, input, DEFAULT_SERVICE_SEARCH_FLAGS);
LineageScrollResult finalResult =
new LineageScrollResult().setEntities(new LineageSearchEntityArray(Collections.emptyList()))
.setMetadata(new SearchResultMetadata().setAggregations(new AggregationMetadataArray()))
Expand All @@ -623,7 +624,7 @@ private LineageScrollResult getScrollResultInBatches(List<LineageRelationship> l

LineageScrollResult resultForBatch = buildLineageScrollResult(
_searchService.scrollAcrossEntities(entitiesToQuery, input, finalFilter, sortCriterion, scrollId, keepAlive, querySize,
searchFlags), urnToRelationship);
finalFlags), urnToRelationship);
querySize = Math.max(0, size - resultForBatch.getEntities().size());
finalResult = mergeScrollResult(finalResult, resultForBatch);
}
Expand Down

0 comments on commit e09a2e6

Please sign in to comment.