1.29.9.4.3. Fetching result

Let's get nodes:

NodeIterator it = result.getNodes();


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

The NodeIterator will return "document1" and "document3".

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:title...jcr:pathjcr:score
First document.../document12674
Second document.../document32674


Copyright ©2012. All rights reserved. eXo Platform SAS