Fields are like columns in a database table or contents in a document that you would like to search. When Watson™ Explorer Engine is creating a structured query by converting the CGI parameters based on an input form, it assigns a field to each term. The default field is query, while other common fields are url, title, etc.
To allow end users to search in a specific field, you need to ensure that the following conditions are fulfilled:
- The field is defined in the syntax. Go to the add a field section to
add a new field.
When you create a new field, you need to specify three attributes:
- name: A unique name, used for referencing this field, such as when creating an operator.
- processing: If a field is strict, a structured query having terms in this field will not be forwarded to a source whose form does not support it. If a field is optional, the query will be forwarded even if the field is not supported (strict by default).
- record: A flag to decide if the content of the query terms for that field should be recorded and passed to the clustering for optimization. As a simple rule, only fields related to contents indexed by the clustering, like title and abstract, should be recorded.
- The input form lets the user query the specific fields. You can do the following:
- Add an input or select element in the input form associated with the field.
- Add an operator to one of the input fields in the current input form, allowing the user to query that field. Usually, this type of operator has the form FIELD_NAME:, but different formats can be used.
- Add a %field% operator to one of the input elements in the current input form, allowing the user to query all of the defined fields with the same operator format.
- The queried sources need to support this field. Similarly to modifying the input form,
you'll need to configure the form associated to each source, specifying what input parameter
or what operator can be used to query the field.
In the particular case of a search engine source, you'll need to specify what indexed content will be searched for this specific field. Check the search engine's indexing status to see the names of the contents currently indexed. The default form template for search engine sources lets you specify one-to-one matches between field names and content names.
See the online schema documentation for a complete specification on fields. For information on operators, click Operators.