Creating a Fast Index for Metadata
About this task
In order to be used for sorting and filtering, metadata content elements have to be indexed in a special way, known as a fast index. A fast index is a memory-resident index that can be accessed quickly and which is flexible enough to be used to filter or pre-organize query results. Any content elements that you want to be able to search by must also be defined in the Watson™ Explorer Engine software, as explained later in Searching Metadata Content.
Metadata content elements that are to be fast-indexed must be identified on a search collection's Indexing tab.
- Click edit to display the screen where you can enter the names of the content elements that you want to fast index
Locate the Fast Index section in the General category, as shown in Figure 1.
Fast index definitions consist of a list of name|type entries, one per line. These identify each content element that you want to fast index and its datatype. Supported datatypes are date (a special data type that automatically invokes the viv:parse-date function on a date string to produce an integer that can be fast-indexed), float (floating-point), double, a double-precision floating-point number, number (same as double), int (integer), or set (a set of values, such as a character string). All data of type set (or without a type specification) is treated as HTML data.
- Click Modified to enable you to specify custom fast index content elements.
- After clicking Modified, you will see a default value of last-modified|date, which you can remove for the purposes of this tutorial.
After removing this value, add the following values to the Fast Index field:
These are the fast index definitions for the metadata fields year (which has an int data type), and hero, which is the field containing the name of the main character for each book in the example files, and has the default data type of set, a set of values made up of the union of all of the characters used in all of the string values for this metadata field.
- After entering these values, click OK to save your changes and close the Indexing tab's edit screen.
To proceed to the next section of this tutorial, click Crawling and Indexing the Sample Files.