08-17-2009 05:37 AM
// 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);
08-17-2009 09:52 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.