Default Query Syntax

Query syntax is the term used to describe the combination of words, keywords, and symbols that you can use when searching for words or phrases using any search application. Watson Explorer Engine can query search collections created with its search engine and can also query other search engines that may have their own unique interpretation of different keywords and symbols.

Note: Watson Explorer Engine does not support submitting queries for empty strings in its standard and advanced query forms using the syntax "". These forms support the standard syntax for searching for an empty string, which are to click Search without entering any text in the portion of the form in which you specify the search string, or to position the cursor in that text area and press Enter or Return.

Queries in which you are searching for empty instances of specific content elements should be submitted in XML, as in the following example, which searches for empty instances of the content element FIELDNAME:

<operator logic="and">
  <operator logic="equal" name="equal" start-string="==" precedence="9">
    <term field="FIELDNAME" str="" phrase="phrase" input-type="user" />
  </operator>
</operator>

Note that this example will only match instances of the FIELDNAME field that are actually empty. This will not match FIELDNAME fields that contain whitespace or other non-visible characters.

To enable a user to type a query without having to worry about the specific syntax used by other search engines or online sources of information, Watson Explorer Engine uses a multi-stage process to read the values that a user enters and submit them to the appropriate search engines. A user's query is entered on a Watson Explorer Engine Input Form, which parses the user's query and converts it into a normalized structured query that is represented in an internal XML format. The form associated with each specific target application (search engine, email archive system, content management system, and so on - known as a Source) then uses the source-specific information in that form to reassemble the structured query into the format that the target application accepts, and submits the query to the remote application.

The tables in the following two sub-sections show the default syntax supported by the standard Watson Explorer Engine simple and advanced input forms (assuming that they have not been modified by the administrator). Default Keywords and Operators shows generic operators that are directly supported by most search engines. Watson Explorer Engine-Related Query Syntax describes operators that are more specific to the search and indexing operations performed by the Watson Explorer Engine search engine, which operate on regions of text. This is a rich query syntax that enables you to issue precise queries which not only identify the terms or phrases that you are looking for, but which also enable you to identify complex conditions such as the proximity of one word/phrase to another, the portion of a search result in which a term or phrase must be located, and so on. This syntax is directly supported by the Watson Explorer Engine search engine.

Note: Watson Explorer Engine applications can also support XPath operators in queries. XPath is a query language that enables applications to select and process the values contained in specific nodes in an XML document. XPath operators can be used in Watson Explorer Engine queries as long as the fields that are being referenced by those queries have been fast-indexed in the Watson Explorer Engine application. See Fast-Indexing in the Watson Explorer Engine documentation for more information.

See the XPath Tutorial for general information XPath and XPath operators. See XPath Operator Support for detailed information about enabling XPath operators in Watson Explorer Engine applications.