-
Notifications
You must be signed in to change notification settings - Fork 367
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
Standardize and improve search functionality #476
Conversation
@NotNull final Expression<String> expression, | ||
@NotNull final String value | ||
) { | ||
if (StringUtils.contains(value, PERCENT)) { |
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 do we differentiate '%' and '%'?
What about the underscore character? It's a valid wildcard character for LIKE. |
@skwslide the scope of this work wasn't to address the edge cases that exist in the characters it was to: From an API perspective we shouldn't bleed through underlying implementation details like what the backend data store wildcards are. For now we've always used the |
@tgianos, you want to expose only
|
This PR addresses two issues:
Job search by id and name was degrading at large job database size. It was performing a
LIKE
no matter what string was passed in. Now the code searches for the presence of the%
character and if it's not present it switches that predicate to be anEQUAL
String fields across resources were treated differently. Some were defaulting to
EQUAL
predicates and some toLIKE
predicates. Now all string fields supported by the API for search will useEQUAL
by default and switch toLIKE
if a%
is present