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
#1526 Added the type param to the Search REST API #1550
Conversation
@cbeach47 it looks like CI is requesting code style changes. git pull upstream master --rebase
./gradlew goJF
git add --all
git commit |
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.
LGTM, thanks @cbeach47! 🙇
...i/uPortal-api-rest/src/test/java/org/apereo/portal/rest/search/SearchRESTControllerTest.java
Show resolved
Hide resolved
HttpServletRequest request, | ||
HttpServletResponse response) | ||
throws IOException { | ||
|
||
final Map<String, List<?>> searchResults = new TreeMap<>(); | ||
if (logger.isDebugEnabled()) { | ||
logger.debug( | ||
"Searching with q={}, type={}", query, ArrayUtils.toString(types.toArray())); |
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.
At least some of this logging code is unnecessary. I think the following will work nicely...
logger.debug("Searching with q={}, type={}", query, types);
Without trying it, I'm not sure if the ArrayUtils.toString(types.toArray())
part is necessary.
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.
Update...
DEBUG [http-nio-8080-exec-2-admin] o.a.p.r.search.SearchRESTController 2019-02-26 16:18:30,738 - Searching with q=student, type=[people, portlets]
DEBUG [http-nio-8080-exec-9-admin] o.a.p.r.search.SearchRESTController 2019-02-26 16:18:44,240 - Searching with q=student, type=[portlets]
Tested locally -- works well. 👍 |
Resolves #1526.
Checklist
Description of change
/api/v5-0/portal/search
can now take an optionaltype
parameter that can be a multi-value parameter.