Let's get nodes:
NodeIterator it = result.getNodes();
if(it.hasNext())
{
Node findedNode = it.nextNode();
}
NodeIterator will return nodes in the following order - "node3","node2" and "node1".
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:primaryType | jcr:path | jcr:score |
|---|---|---|
| nt:unstructured | /testroot/node3 | 1000 |
| nt:unstructured | /testroot/node2 | 1000 |
| nt:unstructured | /testroot/node1 | 1000 |