1.29.9.15.3. Fetching the Result

Let's get nodes:

NodeIterator it = result.getNodes();


if(it.hasNext())
{
   Node findedNode = it.nextNode();
}

The NodeIterator will return "node1" and "node2".

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:primarytypjcr:pathjcr:score
nt:unstructured/node1 3806
nt:unstructured/node2 3806


Copyright ©2012. All rights reserved. eXo Platform SAS