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

#1526 Added the type param to the Search REST API #1550

Merged
merged 5 commits into from Feb 27, 2019

Conversation

cbeach47
Copy link
Contributor

@cbeach47 cbeach47 commented Feb 26, 2019

Resolves #1526.

Checklist
Description of change

/api/v5-0/portal/search can now take an optional type parameter that can be a multi-value parameter.

@ChristianMurphy
Copy link
Member

@cbeach47 it looks like CI is requesting code style changes.
The quickest way to apply the changes would be to run:

git pull upstream master --rebase
./gradlew goJF
git add --all
git commit

@ChristianMurphy ChristianMurphy added this to the 5.5.0 milestone Feb 26, 2019
@ChristianMurphy ChristianMurphy added the enhancement Improvement label Feb 26, 2019
Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @cbeach47! 🙇

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()));
Copy link
Contributor

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.

Copy link
Contributor

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]

@drewwills
Copy link
Contributor

Tested locally -- works well. 👍

@drewwills
Copy link
Contributor

@mairi & @hsun1

@drewwills drewwills merged commit 06b64f6 into uPortal-Project:master Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants