I'm wondering if it's possible at all to determine which property a Query's match was found on, not just which Node?
Looked around for an answer first and only found this link[1] from kalyanar in this thread[2].
Following that, the following code will run a fulltext query for the word "break":
// make SQL query QueryManager queryManager = workspace.getQueryManager(); // we want find 'document1' String xpathStatement = "//element(*,mix:title)[jcr:contains(.,'break')]"; // create query Query query = queryManager.createQuery(xpathStatement, Query.XPATH); // execute query and fetch result QueryResult result = query.execute(); // Nodes NodeIterator it = result.getNodes(); while(it.hasNext()) { Node findedNode = it.nextNode(); // can get all properties from here, but not sure which one matched the query... } // 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(); // can check each value here, but again, not sure which one matched the query... }
... but as you can see in each result iterator above, don't know if it's possible to determine which property name a match was found on.
[1] https://docs.jboss.org/exojcr/1.12.13-GA/developer/en-US/html/ch-jcr-query-usecases.html
[2] http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...