0 Replies Latest reply on Oct 15, 2015 7:29 PM by Shehjadkhan

    How to modify the existing query object to add more predicates, which I have loaded from store path

    Shehjadkhan Level 1

      Hi All,

      In my application I have created a custom component something similar to list component where I allow authors to add a query builder syntax query and pull result on basis of it. I am taking this whole query from my dialog and then loading this query using below code.

        query = queryBuilder.loadQuery(getCurrentResource().getPath() + "/" + "customQuery", session);

      The above code works perfectly fine, but now I want to enhance my component filter the result on the basis of page property tags also. For example out of total result I only want to see page which are tagged with a particular tag (say marketing:interest ). Basically this is a facet functionality which I want to provide to the end user. So how can I manipulate my query object and before i run getResult method so that I get revelant results.

      final SearchResult result = query.getResult();