int itemsPerPage)
throws SearchException {
<BUG>Hits hits = null;</BUG>
try {
ThemeDisplay themeDisplay =
<BUG>(ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY);
hits = CompanyLocalServiceUtil.search(

themeDisplay.getCompanyId(), keywords,

SearchEngineUtil.ALL_POS, SearchEngineUtil.ALL_POS);
Object[] values = addSearchResults(
keywords, startPage, itemsPerPage, hits,
</BUG>
"Liferay Portal Search: " + keywords, SEARCH_PATH,

int itemsPerPage)
throws SearchException {
try {
ThemeDisplay themeDisplay =
(ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY);
int start = (startPage * itemsPerPage) - itemsPerPage;
int end = startPage * itemsPerPage;
Hits results = CompanyLocalServiceUtil.search(
themeDisplay.getCompanyId(), keywords, start, end);
int total = results.getLength();
Object[] values = addSearchResults(
keywords, startPage, itemsPerPage, total, start,
"Liferay Portal Search: " + keywords, SEARCH_PATH,
