List of usage examples for com.liferay.portal.kernel.search Document get
public String get(Locale locale, String name, String defaultName);
From source file:com.liferay.portlet.journal.util.JournalArticleIndexer.java
License:Open Source License
protected String getBasicContentSummary(Document document, Locale snippetLocale) { String prefix = Field.SNIPPET + StringPool.UNDERLINE; String content = document.get(snippetLocale, prefix + Field.DESCRIPTION, prefix + Field.CONTENT); if (Validator.isBlank(content)) { content = document.get(snippetLocale, Field.DESCRIPTION, Field.CONTENT); }//from w w w. j av a 2 s . co m if (content.length() > 200) { content = StringUtil.shorten(content, 200); } return content; }