How can I list all the properties and respective values for more than one property under a give node.
For example, the below code, I could search for one property only. But I need to search for 10 different property(alttext, img, promos.. etc) and get respective values(if exist) for it.
Map<String, String> map = new HashMap<String, String>();
map.put(TYPE_PREDICATE, "nt:base");
map.put(PATH_PREDICATE, printAttachmentJsonNodePath);
map.put("property", "fileReference");
map.put("p.excerpt", "true");
map.put(SEARCH_LIMIT_PREDICATE, "-1");
Query query = queryBuilder.createQuery(PredicateGroup.create(map),
resourceResolver.adaptTo(Session.class));
SearchResult result = query.getResult();
for (Hit hit : result.getHits()) {
String path = hit.getPath();
Resource resourceHit = resourceResolver.getResource(path);
Node node = resourceHit.adaptTo(Node.class);
String fileReference = node.getProperty("fileReference").getString();
System.out.println(fileReference);
}