Version 4 (modified by csa, 15 years ago)
--

search

Service performs searches for various information in ADEI and source databases. ADEI has a modular 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

  • search? - A search string, could include the list of search modules along with parameters

Optional Properties

  • 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.

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:

<result>
  <module name="item" title="Items">
     ... module results, see the description below ...
  </module>
  <module name="groups" title="Log Groups">
     ... module results, see the description below ...
  </module>
  ...

The empty result is returned if nothing is found:

<result/>

In the case of error, the error message in the following format is returned:

<result>
 <Error>Unknown control_group (0) is specified</Error>
</result>

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":

<result>
  <module name="item" title="Items">
     <results>
        <Value  title="412-RTP-5-0011" props="db_server=katrin&amp;db_name=detector&amp;db_group=0&amp;db_mask=72"/>
        <Value  title="412-RTP-5-0012" props="db_server=katrin&amp;db_name=detector&amp;db_group=0&amp;db_mask=75/">
        ...
     </result>
  </module>
</result>

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.

<result>
  <module name="interval" title="Dates">
     <results>
        <Value  title="Jan 1, 2009 00:00:00 - Feb 1, 2009 00:00:00" props="window=1230768000-1233446400" certain="1"/>
     </result>
  </module>
</result>

HTML Results