Adding new metadata fields

When source documents contain metadata fields that are not listed in the default set, you can add them:

StepsTo add metadata fields

  1. Using a text editor, open the Metadata.xml located in <installLocation>\OmniQ\config.

  2. Anywhere within the XML Metadata tag, add a new field tag specifying the following attributes:

  3. Save and close the file.

For example, if the new metadata field is Customer ID, the new field tag would look similar to this:

<Field name=“custId” displayName=“Customer ID” type=“INT” parser=“integer_2” indexable= “true” />

NoteYou must add the new metadata field before indexing any documents.

If the metadata field requires parsing from a nonstandard string (for example, to change the customer ID portion of the string “CUST-98334” to an INT), refer to “Developing and configuring customized parsers”.

If you need to search the new metadata field in a different format from that in which it was indexed, you must configure a new query parser. For example, if INT metadata field values have been parsed from strings such as “CUST-98334,” but you do not want to type the “CUST-” prefix for searching, you can add a new query parser configuration as follows:

  1. Using a text editor, open QueryParsers.xml, which is located in <installLocation>\OmniQ\config.

  2. Anywhere within the XML QueryParsers tag, add a new MetadataField tag, specifying the following attributes:

  3. Save and close the file.

  4. Restart Sybase Search.

Using the above example, the new MetadataField tag might look similar to this:

<MetadataField name="custId" parser="integer_2" />

NoteYou can change the query parser configuration at any time.