3 Replies Latest reply on May 23, 2013 5:22 AM by ddigal

    regarding query builder api

    ddigal
      Hi,

         i am able to create image reference but not able to create image path from dam i am putting like this

         map.put("type", "dam:Asset"); is this correct or is there any other way to getpath of image from dam .please let me know

      code------------

      Map<String, String> map = new HashMap<String, String>();
              map.put("path", "/content/dam");
              map.put("type", "dam:Asset");
              map.put("group.p.or", "true"); // combine this group with OR
              map.put("group.1_fulltext", fulltextSearchTerm);
              map.put("group.1_fulltext.relPath", "jcr:content");
              map.put("group.2_fulltext", fulltextSearchTerm);
              map.put("group.2_fulltext.relPath", "jcr:content/@cq:tags");
           
            
             log.info("======mapout======"+map);
              Query query = builder.createQuery(PredicateGroup.create(map),session);
              log.info("======query======"+query);
              SearchResult result = query.getResult();
               // log.info("======result======"+result);
                   
                     // iterating over the results
              for (Hit hit : result.getHits()) {
                  String path = hit.getPath();
                // ValueMap props = hit.getProperties();
                 response.getWriter().write(path);
                 //response.getWriter().write(props);
                
                   log.info("======result======"+result);
              }