= search =
Service performs searches for various information in ADEI and source databases. ADEI has a modular [wiki:adeiSEARCH SEARCH SubSystem]. The search capabilities are provided by the search engines which providing one-or-more search modules. The understanding of the subsystem is mandatory to use the service.
== Mandatory Properties ==
* [wiki:adeiParam_search search] - A search string, could include the list of search modules along with parameters
== Optional Properties ==
* [wiki:adeiParam_search_modules search_modules] - A list of search modules to perform search along with parameters. If modules are specified in ''search'' property as well, the module specified in ''search'' take precedence. If the search modules are neither specified in the ''search_modules'' nor in the ''search'' string. the search string would be analyzed. Analysis routine is guessing the type of search and executes a default set of modules for that type.
== Additional Properties ==
All standard data source / time interval properties can be taken into the account by search modules. For example, they can sort the found result putting the results from currently selected data source first. The searching only within the currently selected group is another possible example.
* [wiki:adeiParam_db_server db_server ] - Data source / system
* [wiki:adeiParam_db_name db_name ] - Database name
* [wiki:adeiParam_db_group db_group ] - Log Group
* [wiki:adeiParam_control_group control_group ] - Control Group
* [wiki:adeiParam_experiment experiment ] - The current experiment/run duration
* [wiki:adeiParam_window window] - Data Interval (everything by default)
== Returned Result ==
The XML document with results found by all used modules. If certain module have produced no results it is not included in the output. The following format is used:
{{{
... module results, see the description below ...
... module results, see the description below ...
...
}}}
The empty result is returned if nothing is found:
{{{
}}}
In the case of error, the error message in the following format is returned:
{{{
Unknown control_group (0) is specified
}}}
The module results are returned by modules in two different forms: XML and HTML.
== XML Results ==
The most modules are returning the results in the XML format. Each result is returned in ''Value'' XML node and all ''Value'' nodes are enclosed in the ''result'' node. The ''Value'' node includes several attributes:
* ''title'' - describing the result
* ''props'' - URL encoded string with parameters to adjust in the ADEI system, if this result is selected
* ''certain'' - This optional property is indicating what the ADEI is certain about this result
The response to following search request:
{{{
http://adei_server.net/adei/services/search.php?search_module=item&search=temperature
}}}
returns all items which names are started with "temperature":
{{{
...
}}}
The '''props''' property in this case defines ''db_server'', ''db_name'', ''db_group'', and ''db_mask'' properties which are fully describing the result. If these properties are passed to the ADEI system, the found item will be displayed.
Another example uses the ''interval'' search module to find the UNIX timestamps of the entered textual date
{{{
http://adei_server.net/adei/services/search.php?search=January 2005
}}}
The '''props''' in this case contains ''window'' property which should be passed to ADEI system to limit the data a single month in year 2005.
{{{
}}}
== HTML Results ==