Package com.day.crx.statistics.keyword
Class ExtractKeywordsReport
java.lang.Object
com.day.crx.statistics.Report
com.day.crx.statistics.keyword.ExtractKeywordsReport
ExtractKeywordsReport implements a report, which extracts
keywords from the statistical query and result data. The algorithm works
as follows:
- Get the
nmost popular queries for a given period. - For each query, retrieve the results that were selected the most. Whether a result is considered relevant depends on the number of times it was selected. The threshold is set to half the value of the most selected result, but at least 2.
-
Constructor Summary
ConstructorsConstructorDescriptionExtractKeywordsReport(String queryDataPath, String resultDataPath) Creates a new report.ExtractKeywordsReport(String queryDataPath, String resultDataPath, boolean traversalOk) Creates a new report. -
Method Summary
-
Constructor Details
-
ExtractKeywordsReport
Creates a new report.- Parameters:
queryDataPath- the path where query data is stored.resultDataPath- the path where result data is stored.
-
ExtractKeywordsReport
Creates a new report.- Parameters:
queryDataPath- the path where query data is stored.resultDataPath- the path where result data is stored.traversalOk- set to true to put "traveral ok" option in the statistics query
-
-
Method Details
-
getResult
Runs the report and returns a result iterator overObject[]instances. Returns result rows with the following objects:- Path
Stringof a page Longcount (how may times the page was selected as a result)ListofStrings (the keywords)
- Specified by:
getResultin classReport- Parameters:
session- the session giving access to the workspace.- Returns:
- Iterator over
Objectresults. - Throws:
RepositoryException- if an error occurs while reading from the repository.
- Path
-
getSize
public int getSize()- Returns:
- the maximum number of queries analyze.
-
setSize
public void setSize(int size) - Parameters:
size- the maximum number of queries to analyze.
-
getPeriod
public int getPeriod()- Returns:
- the report period in number of days.
-
setPeriod
public void setPeriod(int period) - Parameters:
period- the report period in number of days.
-