Identifying Index Fields
The indexing process begins with the creation of an index model within Monarch, via the same field definition process that you would use to extract fields of data from a report (refer to the Altair documentation for detailed instructions on this process). When creating an index model to be used in Monarch Server Web, however, only those fields that are to be used as index fields need to be identified. When you configure a document type within Monarch Server, you will map these Monarch indexes to the document type's index fields.
Monarch Index Definition Considerations
When creating an index model within Monarch, consider doing the following:
-
Include only the fields you want to index: The index model file should contain all the fields that you plan to map to index fields for the given document type in Monarch Server. It is not necessary to include other fields in the model — in fact, it is preferable that you do not include them. All fields contained in the model will be extracted from the report as part of the archive process, so unused fields would be extracted unnecessarily. Keeping the number of fields to a minimum will speed up the archiving process.
-
Index fields should be natural fields: Calculated fields should not be used as index fields unless they are derived from a natural field (that is, a field extracted from your reports).
-
Avoid page header templates: Index fields cannot be derived from page header templates.
-
Use a detail-level template to access the Data View: During the archive process, all fields in the index model will be used as index fields, regardless of their template level. You don’t need or even necessarily want a detail-level template.
However, if you do not create a detail template, you will not be able to go to the Data View. You may want to go to the Data View in order to gain access to the field properties for the index fields you have defined.
You can get around this problem in two ways. The first way is to create your lowest-level index field as a detail template, regardless of whether it is truly at the detail level in the report. The second way is to define a detail template temporarily, providing access to the Data View. You can then delete the detail-level model before saving the index model.
-
Match data type and check data length: As part of the document type configuration process in Monarch Server, index fields are mapped to their corresponding Monarch indexes. In order to ensure proper operation, the data type (and field length, when applicable) of the Monarch Server Web index fields and Monarch indexes must coincide. For example, if in Monarch Server you create a string index field, and then you attempt to map it with a Monarch date index, the mapping will fail due to the incompatibility of their data types.
In addition, you should check that the defined length of the Monarch indexes is less than or equal to that of the corresponding index fields in Monarch Server Web. If they are longer, Monarch Server Web will truncate the index field's data when it is stored. This may cause errors during the archive process if, for example, an index field is no longer unique due to truncation.
-
Set the Ignore Leading Control Characters setting to zero: Depending on the source of your report data, your report files may contain one or more extra characters at the beginning of each line. These characters are typically printer control codes that have no meaning to Monarch. Monarch provides a setting that allows you to strip a specific number of characters from your reports when they are viewed so that these characters do not interfere with report data.
If you supply a number greater than 0 for this setting in your Monarch index model, that number of characters will be stripped from the input report as it is compressed and archived in the warehouse. The characters are permanently removed. If the number is set to 0, no leading control characters are removed from your report. However, you may still choose to ignore those characters when viewing, by setting an appropriate value in the Monarch model file that is launched for viewing.
NOTE: In order to ensure that characters are not stripped from your report files inadvertently, it is recommended that the value be set to 0 for all Monarch index models.
To review or change the Ignore Leading Control Characters setting
-
In Monarch, open the desired report (File, Open Report) and model files (File, Open Model), then select Options, Input (ALT,O,I) from the main menu to display the Input Options dialog box.
-
Enter the appropriate number of leading control characters to ignore in the Ignore n Leading Control Characters field.
NOTE: It is recommended that you set this number to 0 for the index model.
-
Click OK to close the Input Options dialog box, then save the change to the model by selecting File, Save Model.
-
Turn off the Ignore Form Feed Characters setting: Many report files use a form feed character to indicate the top of a new page. This is especially useful when breaking reports into documents if the Top of Page option is chosen. Monarch provides a setting that allows you to ignore form feed characters that are embedded in the report. Note: For most reports, it is recommended that the setting be unselected in the Monarch index model.
-
To review or change the Ignore Form Feed Characters setting
-
In Monarch, open the desired report (File, Open Report) and model files (File, Open Model), then select Options, Input (ALT,O,I) from the main menu to display the Input Options dialog.
-
If the Ignore Form Feed Characters check box is selected, clear it.
-
Click OK to close the Input Options dialog, then save the change to the model by selecting File, Save Model.
Monarch Server Web Index Field Considerations
A few things to consider before adding index fields in Monarch Server:
-
Survey your user’s requirements: The point of an index is to help users find documents in the report warehouse as quickly as possible, so you should be sure to index the fields that users are likely to use when looking up a particular type of document. In many cases, the selection of index fields is obvious. However, that is not always the case. The best way to ensure that you are meeting your user’s requirements is to ask them. Take a copy of a representative document and ask users which fields they would want to use to find that document in a database.
-
Choose unique identifiers: When selecting index fields, it is best to select the most unique identifiers in the document, such as Customer name, Social Security Number, Invoice Number, etc. You should not, in general, select fields that would return a large number of instances, like State, for example. You should also avoid using fields that may not have consistent input. For example, Bill or William in the First Name field could both refer to the same customer, making it difficult to locate all documents for that individual. The more unique the identifier, the more precise the lookup will be. These identifiers are often found as column heads, titles, or page headers. In Monarch terms, they are typically found at an Append level.
-
Index only necessary search fields: In general, you should avoid indexing line item data. In Monarch terms, this means you should generally not index items that are at the Detail level. These index entries would significantly increase the size of the index and increase the length of time required for the system to search the index tables. In addition, having a lot of index entries means that the initial processing of the report will take longer.
© 2024 Altair Engineering Inc. All Rights Reserved.