1
14
15 package com.liferay.portlet.blogs.util;
16
17 import com.liferay.portal.kernel.search.Hits;
18 import com.liferay.portal.search.HitsOpenSearchImpl;
19 import com.liferay.portlet.blogs.service.BlogsEntryLocalServiceUtil;
20
21
26 public class BlogsOpenSearchImpl extends HitsOpenSearchImpl {
27
28 public static final String SEARCH_PATH = "/c/blogs/open_search";
29
30 public static final String TITLE = "Liferay Blogs Search: ";
31
32 public Hits getHits(
33 long companyId, long groupId, long userId, String keywords,
34 int start, int end)
35 throws Exception {
36
37 return BlogsEntryLocalServiceUtil.search(
38 companyId, groupId, userId, 0, keywords, start, end);
39 }
40
41 public String getSearchPath() {
42 return SEARCH_PATH;
43 }
44
45 public String getTitle(String keywords) {
46 return TITLE + keywords;
47 }
48
49 }