1.29.9.21.4. Fetching the Result

Let's get nodes

NodeIterator it = result.getNodes();


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

NodeIterator will return nodes in the following order: "document3", "document2", "document1".

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:description...jcr:pathjcr:score
The fox is a nice animal..../document32512
The brown fox lives in the forest..../document23595
The quick brown fox jumps over the lazy dog..../document15017

Copyright ©2012. All rights reserved. eXo Platform SAS