Class MostPopularResultsReport


  • public class MostPopularResultsReport
    extends Report
    MostPopularResultsReport implements a report that returns the most popular results in a given period.
    • Constructor Detail

      • MostPopularResultsReport

        public MostPopularResultsReport​(java.lang.String dataPath)
        Parameters:
        dataPath - the path where the results statistics are stored.
    • 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:
        • Path String, which indicates the month
        • Long count (how may times a result was selected)
        • String[] with recent queries that lead to this result.
        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.
      • setDate

        public void setDate​(long date)
        Parameters:
        date - the report covers the month as indicated by date.
      • getDate

        public long getDate()
        Returns:
        the report covers the month as indicated by date.