mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -141,24 +141,11 @@ public class SearchQuery extends AbstractQuery<ResultSet>
|
|||||||
}
|
}
|
||||||
ResultSetRowNode rowNode = createResultSetRowNode(nodeRef, nodeService);
|
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[1];
|
||||||
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++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// add one extra column for the node's path
|
// 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();
|
ResultSetRow row = new org.alfresco.repo.webservice.types.ResultSetRow();
|
||||||
row.setColumns(columns);
|
row.setColumns(columns);
|
||||||
|
Reference in New Issue
Block a user