Search API updates. FTS fixes for range and dual tokenisation.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14419 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2009-05-22 14:36:48 +00:00
parent 48050c31bc
commit 0e56f7f40c

View File

@@ -141,24 +141,11 @@ public class SearchQuery extends AbstractQuery<ResultSet>
}
ResultSetRowNode rowNode = createResultSetRowNode(nodeRef, nodeService);
// get the data for the row and build up the columns structure
Map<Path, Serializable> values = searchRow.getValues();
NamedValue[] columns = new NamedValue[values.size() + 1];
int col = 0;
for (Path path : values.keySet())
{
// Get the attribute QName from the result path
String attributeName = path.last().toString();
if (attributeName.startsWith("@") == true)
{
attributeName = attributeName.substring(1);
}
columns[col] = Utils.createNamedValue(dictionaryService, QName.createQName(attributeName), values.get(path));
col++;
}
NamedValue[] columns = new NamedValue[1];
// add one extra column for the node's path
columns[col] = Utils.createNamedValue(dictionaryService, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "path"), nodeService.getPath(nodeRef).toString());
columns[0] = Utils.createNamedValue(dictionaryService, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "path"), nodeService.getPath(nodeRef).toString());
ResultSetRow row = new org.alfresco.repo.webservice.types.ResultSetRow();
row.setColumns(columns);