Skip to content
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

Fix HostSearch substring for loose search #1076

Conversation

roulaoregan-spi
Copy link
Contributor

Summarize your change.
Bug with cueadmin arg handler -lh, it should allow a substring match for the hosts being searched, but user
was trying -lh PARTIAL_HOST_NAME -alloc location.general, api.getHosts uses search.HostSearch.byOptions but Criteria.java sql search was not returning any results, substring in HostSearch.java was calling addPhrase which does NOT do a SQL loose match, changed HostSearch.java to use addLikePhrase, this will search substrings in sql (just like JobSearch.java which uses addLikePhrase for SQL substring searches.

Bug with cueadmin arg handler -lh, it should allow a
substring match for the hosts being searched, but user
was trying `-lh PARTIAL_HOST_NAME -alloc location.general`,
api.getHosts uses search.HostSearch.byOptions but
Criteria.java sql search was not returning any results,
substring was calling addPhrase which does NOT do a SQL
loose match, changed HostSearch.java to use `addLikePhrase`,
this will search substrings in sql (just like JobSearch.java
which uses addLikePhrase for SQL substring searches.
@bcipriano bcipriano merged commit 6a91e73 into AcademySoftwareFoundation:master Jan 17, 2022
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.

3 participants