From e09a2e6c85460f6842b7a066963496cdf756522a Mon Sep 17 00:00:00 2001 From: Indy Prentice Date: Sat, 29 Jul 2023 04:56:49 -0300 Subject: [PATCH] feat(lineage): Apply search flags to scroll query in LineageSearchService (#8518) Co-authored-by: Indy Prentice --- .../com/linkedin/metadata/search/LineageSearchService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metadata-io/src/main/java/com/linkedin/metadata/search/LineageSearchService.java b/metadata-io/src/main/java/com/linkedin/metadata/search/LineageSearchService.java index 930a55c56cb6e..c561ddd38b919 100644 --- a/metadata-io/src/main/java/com/linkedin/metadata/search/LineageSearchService.java +++ b/metadata-io/src/main/java/com/linkedin/metadata/search/LineageSearchService.java @@ -606,6 +606,7 @@ public LineageScrollResult scrollAcrossLineage(@Nonnull Urn sourceUrn, @Nonnull private LineageScrollResult getScrollResultInBatches(List 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())) @@ -623,7 +624,7 @@ private LineageScrollResult getScrollResultInBatches(List 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); }