// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
if (rows != null)
{
// Get the infomation from the result set
for(ResultSetRow row : rows)
{
String nodeId = row.getNode().getId();
ContentResult contentResult = new ContentResult(nodeId);
for (NamedValue namedValue : row.getColumns())
{
if (namedValue.getName().endsWith(Constants.PROP_CREATED) == true)
{
contentResult.setCreateDate(namedValue.getValue());
}
else if (namedValue.getName().endsWith(Constants.PROP_NAME) == true)
{
contentResult.setName(namedValue.getValue());
}
else if (namedValue.getName().endsWith(Constants.PROP_DESCRIPTION) == true)
{
contentResult.setDescription(namedValue.getValue());
}
else if (namedValue.getName().endsWith(Constants.PROP_CONTENT) == true)
{
// We could go to the content service and ask for the content to get the URL but to save time we
// might as well dig the content URL out of the results.
String contentString = namedValue.getValue();
String[] values = contentString.split("[|=]");
contentResult.setUrl(values[1]);
}
}
results.add(contentResult);
}
Query query = new Query(Constants.QUERY_LANG_LUCENE, "@cm\\:author:" + searchValue);
// Execute the query
QueryResult queryResult = repositoryService.query(STORE, query, false);
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.