Class ResultsByQueryReport


  • public class ResultsByQueryReport
    extends Report
    ResultsByQueryReport implements a report, which returns the result pages that were selected the most for a given query. This report operates on the daily statistics nodes.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultsByQueryReport​(java.lang.String dataPath, java.lang.String query)
      Creates a new report.
      ResultsByQueryReport​(java.lang.String dataPath, java.lang.String query, boolean traversalOk)
      Creates a new report.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator getResult​(Session session)
      Runs the report and returns a result iterator over Object[] instances.
      int getSize()  
      void setSize​(int size)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResultsByQueryReport

        public ResultsByQueryReport​(java.lang.String dataPath,
                                    java.lang.String query)
        Creates a new report.
        Parameters:
        dataPath - the path prefix to the data.
        query - the user query.
      • ResultsByQueryReport

        public ResultsByQueryReport​(java.lang.String dataPath,
                                    java.lang.String query,
                                    boolean traversalOk)
        Creates a new report.
        Parameters:
        dataPath - the path prefix to the data.
        query - the user query.
        traversalOk - set to true to put "traveral ok" option in the statistics query
    • Method Detail

      • getResult

        public java.util.Iterator getResult​(Session session)
                                     throws RepositoryException
        Runs the report and returns a result iterator over Object[] instances.

        Returns result rows with the following objects:

        • String path of a result path
        • Long count (how many times this result was picked)
        Specified by:
        getResult in class Report
        Parameters:
        session - the session giving access to the workspace.
        Returns:
        Iterator over Object results.
        Throws:
        RepositoryException - if an error occurs while reading from the repository.
      • getSize

        public int getSize()
        Returns:
        the maximum number of results to return.
      • setSize

        public void setSize​(int size)
        Parameters:
        size - the maximum number of results to return.