diff --git a/portal-service/src/com/liferay/portal/kernel/search/Summary.java b/portal-service/src/com/liferay/portal/kernel/search/Summary.java
index 8d555d43018b82c293d2acf3aa063e198b632ae2..0f972966e9cf0be6b2d79aa7e8d63d325f5f8cce 100644
--- a/portal-service/src/com/liferay/portal/kernel/search/Summary.java
+++ b/portal-service/src/com/liferay/portal/kernel/search/Summary.java
@@ -14,7 +14,13 @@
 
 package com.liferay.portal.kernel.search;
 
+import com.liferay.portal.kernel.search.util.SearchUtil;
+import com.liferay.portal.kernel.util.ArrayUtil;
+import com.liferay.portal.kernel.util.HtmlUtil;
+import com.liferay.portal.kernel.util.LocaleThreadLocal;
+import com.liferay.portal.kernel.util.StringPool;
 import com.liferay.portal.kernel.util.StringUtil;
+import com.liferay.portal.kernel.util.Validator;
 
 import java.util.Locale;
 
@@ -23,28 +29,57 @@ import javax.portlet.PortletURL;
 /**
  * @author Brian Wing Shun Chan
  * @author Ryan Park
+ * @author Tibor Lipusz
  */
 public class Summary {
 
 	public Summary(
 		Locale locale, String title, String content, PortletURL portletURL) {
 
+		_locale = locale;
 		_title = title;
 		_content = content;
-		_locale = locale;
 		_portletURL = portletURL;
 	}
 
 	public Summary(String title, String content, PortletURL portletURL) {
-		_title = title;
-		_content = content;
-		_portletURL = portletURL;
+		this(
+			LocaleThreadLocal.getThemeDisplayLocale(), title, content,
+			portletURL);
 	}
 
 	public String getContent() {
+		if (Validator.isNull(_content)) {
+			return StringPool.BLANK;
+		}
+
 		return _content;
 	}
 
+	public String getHighlightedContent() {
+		return _escapeAndHighlight(_content);
+	}
+
+	public String getHighlightedTitle() {
+		return _escapeAndHighlight(_title);
+	}
+
+	public String getHighlightedContent(String[] queryTerms) {
+		if (_highlight) {
+			return StringUtil.highlight(_content, queryTerms);
+		}
+
+		return _content;
+	}
+
+	public String getHighlightedTitle(String[] queryTerms) {
+		if (_highlight) {
+			return StringUtil.highlight(_title, queryTerms);
+		}
+
+		return _title;
+	}
+
 	public Locale getLocale() {
 		return _locale;
 	}
@@ -57,10 +92,22 @@ public class Summary {
 		return _portletURL;
 	}
 
+	public String[] getQueryTerms() {
+		return _queryTerms;
+	}
+
 	public String getTitle() {
+		if (Validator.isNull(_title)) {
+			return StringPool.BLANK;
+		}
+
 		return _title;
 	}
 
+	public boolean isHighlight() {
+		return _highlight;
+	}
+
 	public void setContent(String content) {
 		_content = content;
 
@@ -71,6 +118,10 @@ public class Summary {
 		}
 	}
 
+	public void setHighlight(boolean highlight) {
+		_highlight = highlight;
+	}
+
 	public void setLocale(Locale locale) {
 		_locale = locale;
 	}
@@ -85,14 +136,44 @@ public class Summary {
 		_portletURL = portletURL;
 	}
 
+	public void setQueryTerms(String[] queryTerms) {
+		if (ArrayUtil.isEmpty(queryTerms)) {
+			return;
+		}
+
+		_queryTerms = queryTerms;
+	}
+
 	public void setTitle(String title) {
 		_title = title;
 	}
 
+	private String _escapeAndHighlight(String text) {
+		if (!_highlight || Validator.isNull(text) ||
+			ArrayUtil.isEmpty(_queryTerms)) {
+
+			return HtmlUtil.escape(text);
+		}
+
+		text = SearchUtil.highlight(
+			text, _queryTerms, _ESCAPE_SAFE_HIGHLIGHTS[0],
+			_ESCAPE_SAFE_HIGHLIGHTS[1]);
+
+		text = HtmlUtil.escape(text);
+
+		return StringUtil.replace(
+			text, _ESCAPE_SAFE_HIGHLIGHTS, SearchUtil.HIGHLIGHTS);
+	}
+
+	private static final String[] _ESCAPE_SAFE_HIGHLIGHTS =
+		{"[@HIGHLIGHT1@]", "[@HIGHLIGHT2@]"};
+
 	private String _content;
+	private boolean _highlight;
 	private Locale _locale;
 	private int _maxContentLength;
 	private PortletURL _portletURL;
+	private String[] _queryTerms;
 	private String _title;
 
 }
\ No newline at end of file
