Skip to content

Change getRecommendedFriendsBySearch #305

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

Merged
merged 2 commits into from
Apr 7, 2025
Merged

Change getRecommendedFriendsBySearch #305

merged 2 commits into from
Apr 7, 2025

Conversation

ShaneMander
Copy link
Collaborator

Small PR for the existing search endpoint to include results retrieved from the new fuzzy search implementation.

@ShaneMander ShaneMander requested a review from Daggerpov April 5, 2025 05:04
Copy link
Owner

@Daggerpov Daggerpov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left an optional improvement. Good work!

@Table(
name = "user",
indexes = {
@Index(name = "idx_first_name", columnList = "first_name"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem like smart indexes

@@ -32,6 +39,8 @@ public class User implements Serializable {
private String firstName;
private String lastName;
private String bio;

@Column(nullable = true, unique = true)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this needs to be nullable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the App Store requirement for emails, we have to allow users to create accounts without an email

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok

@@ -210,6 +219,12 @@ private Set<UUID> getExcludedUserIds(UUID userId) {

@Override
public List<BaseUserDTO> searchByQuery(String searchQuery) {
List<User> users = searchUsersByQuery(searchQuery);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, could we remove this method and return UserMapper.toDTOList(users) straight from searchUsersByQuery() for simplicity?

@Daggerpov Daggerpov merged commit 956951a into main Apr 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants