Let's get nodes:
NodeIterator it = result.getNodes();
if(it.hasNext())
{
Node findedNode = it.nextNode();
}
NodeIterator will return "folder1", "folder2","document1","document2","document3", and each other nodes in workspace if they are here.
We can also get a table:
String[] columnNames = result.getColumnNames();
RowIterator rit = result.getRows();
while (rit.hasNext())
{
Row row = rit.nextRow();
// get values of the row
Value[] values = row.getValues();
}
Table content is
| jcr:path | jcr:score |
|---|---|
| /folder1 | 1000 |
| /folder1/document1 | 1000 |
| /folder1/folder2 | 1000 |
| /folder1/folder2/document2 | 1000 |
| /folder1/folder2/document3 | 1000 |
| ... | ... |