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