Class RelatedQueriesReport


  • public class RelatedQueriesReport
    extends Report
    RelatedQueriesReport returns a list of related queries.
    • Constructor Detail

      • RelatedQueriesReport

        public RelatedQueriesReport​(String dataPath,
                                    String query)
        Creates a new report.
        Parameters:
        dataPath - the path where result statistics are stored.
        query - the user query.
      • RelatedQueriesReport

        public RelatedQueriesReport​(String dataPath,
                                    String query,
                                    boolean traversalOk)
        Creates a new report.
        Parameters:
        dataPath - the path where result statistics are stored.
        query - the user query.
        traversalOk - set to true to put "traveral ok" option in the statistics query
    • Method Detail

      • getResult

        public Iterator getResult​(Session session)
                           throws RepositoryException
        Runs the report and returns a result iterator over Object[] instances. Returns result rows with the following objects:
        • Related query String
        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 queries to return.
      • setSize

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