Query Builder Basics


Query Builder is an API which can be used to create Search queries in JAVA content repository. It is extensible tool by which you may add/remove various predicates in a query using this API. 
The best way to create predicates is using the Query Builder Debugging Tool : /libs/cq/search/content/querydebug.html . 
Try to implement your Business use case in the Predicate form using this debugger, Optimize the query and then implement it in the code.