When source documents contain metadata fields that are not listed in the default set, you can add them:
Using a text editor, open the Metadata.xml located in %OMNIQ_3.0\OmniQ\config.
Anywhere within the XML Metadata tag, add a new field tag specifying the following attributes:
Name – the name of the metadata field inside the document.
DisplayName – specifies the way the metadata field displays on the search page.
Type – specifies whether the metadata type is TEXT, DATE, FLOAT, or INT.
Parser – the name of the parser used to parse the metadata field for indexing (for TEXT, use one of the internal parsers—TEXT_STANDARD or TEXT_FILENAME. Otherwise, use a parser listed in the Parsers.xml file).
Indexable – set this property to true to index this metadata field.
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” />
You 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 custom 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:
Using a text editor, open QueryParsers.xml, which is located in %OMNIQ_3.0%\OmniQ\config.
Anywhere within the XML QueryParsers tag, add a new MetadataField tag, specifying the following attributes:
Name – the internal name of the metadata.
Parser – the name of any parser listed in the Parsers.xml configuration file.
Save and close the file.
Restart OmniQ Enterprise.
Using the above example, the new MetadataField tag might look similar to this:
<MetadataField name="custId" parser="integer_2" />
You can change the query parser configuration at any
time.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |