-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
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.
Left an optional improvement. Good work!
@Table( | ||
name = "user", | ||
indexes = { | ||
@Index(name = "idx_first_name", columnList = "first_name"), |
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.
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) |
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.
How come this needs to be nullable?
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.
Due to the App Store requirement for emails, we have to allow users to create accounts without an email
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.
Ah ok
@@ -210,6 +219,12 @@ private Set<UUID> getExcludedUserIds(UUID userId) { | |||
|
|||
@Override | |||
public List<BaseUserDTO> searchByQuery(String searchQuery) { | |||
List<User> users = searchUsersByQuery(searchQuery); |
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.
Hey, could we remove this method and return UserMapper.toDTOList(users)
straight from searchUsersByQuery()
for simplicity?
Small PR for the existing search endpoint to include results retrieved from the new fuzzy search implementation.