===== Queries =====
Queries can be about pages, IP addresses, Countries, or Browser/User Agents.

==== Rules ====
Queries are governed by the dominant or **priority** field.
   - Any priority with country set will match the priority field plus the country.
   - Page priority with both user agent and country set will match all three fields.
   - IP queries (i.e. ip priority) ignore all other fields and if an IP is included in a query where another field has priority, the IP address is ignored.

You can choose to ignore all fields other than the priority field and then only the priority field will be searched.

==== Searches ====
The search functions are case-insensitive and will match partial strings as well as whole strings.  So, for instance,
if you search for ''wiki'' in the page search, it will return all pages which occur in the wiki namespace and any other pages
which include wiki in their names.

   - **UserAgent Search:**  This search is useful if a particular user agent does not show up on the drop-down menu. This can happen if a user agent string appears in a subversion but not in the major version string.  A successful search will add whatever is found to the top of the drop-down menu so that  you can then select it.
   - **Country Search: **   If a country does not appear in the list of countries, this will add it to the list so that you can then select it.  If you enter a partial name, it will add all matches.  For instance, if you enter 'isl', you will add a whole list of countries that have Island in their names
   - ** Page:**  This will accept any whole or part of a page name and will return results for all matching values.

==== Dates ====
Dates are all confined to months within the same year.   You can select multiple dates except for page priority.  However, the page
field can be included in a multi-date query where one of the other fields has priority.


==== Output ====
Queries will result in tables with the following columns for each of the months you select from the drop-down menu of months:

|<''IP''>|''Month''|''Accesses''|''Pages''|<''Country''>|''User Agent''|''Search Terms''|''Name Spaces''|''Query String Names''|''Query String Values''|


When you query a page, this data will be displayed for every IP address that has accessed the page.  This can sometimes amount to a considerable amount of output,
especially for IP addresses that are spiders and have accessed many pages on your wiki.  The page column can often have a great many entries. Therefore, when you query a page, you have the option
of displaying a ''brief'' format with the following columns:

|''Month''|''Accesses''|''Country''|''User Agent''|

In the case of output for page queries, there are two results for **accesses**.  The one which appears in the header at the top of the output refers to the number of access for the page being queried.
The accesses field in the table refers to the number of times the IP address has accessed the site.

The columns in angle brackets will not appear in every table.  The ''Country''  column will be excluded from Country queries.  The ''IP''
column will appear in tables with ''User Agent'' and ''Country'' priority.

==== File Menu ====

There is a drop-down menu of files which are currently using the quickstats syntax.  You can click on these an the page will pop up.
This serves a two-fold purpose: \\
1. They give you a convenient means of checking names and IP's which you might want to use in your queries. \\
2. They enable you to keep all your work with quickstats in the admin panel, giving you immediate access to any
charts you may have created with the quickstats syntax plugin.

==== Execution Time ====

If your query times out, you see a "timed out" message. If your server is not set to safemode for PHP scripts, you can increase the maxiumum execution time with the ''max_exec_time'' option in the quickstats section of the Configuration Manager. This option is set by default to 60 seconds. If your server is set to safemode and you have permission to make changes to php.ini, then you can reset the ''max_execution_time'' value in php.ini. The value in php.ini usually defaults to 30 seconds.

In the case of long searches, the timer icon may continue displaying after the timeout period has been exceeded, but the processing has actually stopped and the result will eventually display showing that the maximum timeout had been exceeded.

----

**Notes** \\
1. The User Agent will be a browser or the name of a spider, search engine robot, or crawler.\\
2. The ''Accesses'' column always refers to the number of times the IP address has accessed pages on your wiki. When you request data about a page or group of pages, the header for each page will indicate the number of times the page itself has been accessed.
