-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(recomendations): Make top platforms account only for searchable entities #9240
Conversation
...s/src/main/java/com/linkedin/metadata/recommendation/candidatesource/TopPlatformsSource.java
Outdated
Show resolved
Hide resolved
...s/src/main/java/com/linkedin/metadata/recommendation/candidatesource/TopPlatformsSource.java
Show resolved
Hide resolved
...s/src/main/java/com/linkedin/metadata/recommendation/candidatesource/TopPlatformsSource.java
Outdated
Show resolved
Hide resolved
@@ -116,6 +117,11 @@ public List<RecommendationContent> getRecommendations(@Nonnull Urn userUrn, | |||
.collect(Collectors.toList()); | |||
} | |||
|
|||
protected Filter buildAggregationFilter() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just have a method that liimits the entity indexes which are used for the query?
then the base class can just return a set of entity type names. what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our Elastic SearchDAO is not prepared to received a set of entity names, it's either a specific one or null (which is all). It would be a greater lift to make multiple requests and 1 to each index and then merge all results or create a regex expression that matches for the set of entities we pass it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, don't think this should be a performance concern
This fixes a UI bug where if slack is configured or a custom platform for non-searchable entities is added, then those platforms are not counted towards platforms to be shown above the fold in the homepage.
Checklist