Object[] values = addSearchResults(
keywords, startPage, itemsPerPage, hits,
</BUG>
"Liferay Portal Search: " + keywords, SEARCH_PATH,
themeDisplay);
<BUG>Hits results = (Hits)values[0];
org.dom4j.Document doc = (org.dom4j.Document)values[1];

Element root = (Element)values[2];

for (int i = 0; i < results.getLength(); i++) {
</BUG>
Document result = results.doc(i);

Object[] values = addSearchResults(
keywords, startPage, itemsPerPage, total, start,
"Liferay Portal Search: " + keywords, SEARCH_PATH,
themeDisplay);
org.dom4j.Document doc = (org.dom4j.Document)values[0];
Element root = (Element)values[1];
for (int i = 0; i < results.getDocs().length; i++) {
Document result = results.doc(i);
