<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE lire:report-spec PUBLIC
  "-//LogReport.ORG//DTD Lire Report Specification Markup Language V2.0//EN"
  "http://www.logreport.org/LRSML/2.0/lrsml.dtd">
<lire:report-spec xmlns:lire="http://www.logreport.org/LRSML/"
 superservice="www" schema="www-search" id="keywords-by-search_engine">

 <lire:title>Search Engines with Keywords Report</lire:title>
 <lire:description>
  <para>This report shows the search engines used to access your site
   along with the keywords used.
  </para>
 </lire:description>

 <lire:param-spec>
  <lire:param name="keyword_to_show" type="int" default="5">
   <lire:description>
    <para>This parameter controls the number of keywords to
     display in the report.
    </para>
   </lire:description>
  </lire:param>

  <lire:param name="engine_to_show" type="int" default="10">
   <lire:description>
    <para>This parameter controls the number of search engines to
     display in the report.
    </para>
   </lire:description>
  </lire:param>
 </lire:param-spec>

 <lire:display-spec>
  <lire:title>Requests by Search Engine with Keywords, Top $engine_to_show Search Engines, Top $keyword_to_show Keywords</lire:title>
 </lire:display-spec>

 <lire:filter-spec>
  <lire:ne arg1="$search_engine" arg2="-"/>
 </lire:filter-spec>

 <lire:report-calc-spec>
  <lire:group sort="-requests_total" limit="$engine_to_show">
   <lire:field name="search_engine"/>

   <lire:group sort="-requests_total" limit="$keyword_to_show">
    <lire:field name="keywords"/>

    <lire:count name="requests_total" label="Requests"/>
    <lire:count name="requests_ratio" label="% Total"/>
    <lire:count name="requests_group_ratio" label="% Engine"/>
   </lire:group>
  </lire:group>

 </lire:report-calc-spec>

</lire:report-spec>

