Skip to content

Commit

Permalink
Merge pull request #3 from scijava/forumsearchresult
Browse files Browse the repository at this point in the history
Improve forum search result details
  • Loading branch information
imagejan authored Jan 15, 2018
2 parents 5db20a1 + 3317828 commit 14315f8
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,12 @@ public List<SearchResult> search(final String text, final boolean fuzzy) {
final String forumPostUrl = "http://forum.imagej.net/t/" + metaInfo.get(
"slug") + "/" + metaInfo.get("id") + "/";

final String details = "Tags: " + metaInfo.get("tags") + "<br />" +
"Created: " + metaInfo.get("created_at") + "<br />" +
"Last posted: " + metaInfo.get("last_posted_at");

final Map<String, String> extraProps = new LinkedHashMap<>();
extraProps.put("Tags", metaInfo.get("tags"));
extraProps.put("Created", formatDate(metaInfo.get("created_at")));
extraProps.put("Last posted", formatDate(metaInfo.get("last_posted_at")));
searchResults.add(new WebSearchResult(metaInfo.get("title"), //
forumPostUrl, details, null, extraProps));
forumPostUrl, "", null, extraProps));
}
}
catch (final IOException e) {
Expand Down

0 comments on commit 14315f8

Please sign in to comment.