IDOL Server 24.1

# Index XML Attributes

You can index XML attributes in the same way that you index ordinary fields. However, you must refer to them using the following format for the IDOL Content component to be able to read them:

    */tagName/_ATTR_attributeName

where:

`tagName` | is the name of the tag.
`attributeName` | is the name of the attribute that you want the IDOL Content component to read.

For example:

    <FARM ANIMAL="sheep" COLOR="white"> Farmer Joe </FARM>

To identify the `ANIMAL` attribute to Content, refer to it as

    */FARM/_ATTR_ANIMAL

To identify the `COLOR` attribute to Content, refer to it as

    */FARM/_ATTR_COLOR

Example:

    <ROOM Name="The Kitchen">
    <FURNITURE>Table</FURNITURE >
    <ITEM Type="China">Dish</ITEM>
    </ROOM>

To identify the `Name` attribute to Content, refer to it as

    */ROOM/_ATTR_Name

To identify the `Type` attribute to Content, refer to it as

    */ITEM/_ATTR_Type

To store XML attributes in Index fields

1. Open the IDOL Content component configuration file in a text editor.

2. List an indexing process in the `[FieldProcessing]` section.

   For example:

       [FieldProcessing]
       0=MyFirstProcess
       2=IndexingFields

3. Create a section for the indexing process, in which you create a property for the process (you define a property later, by using one or more applicable configuration parameters). Identify the fields that you want to associate with the processes.

   NOTE: The property that you create must not have the same name as the process.

   For example:

       [MyFirstProcess]
       Property=MyFirstProperty
       PropertyFieldCSVs=*/MyField,*/MySecondField
       PropertyMatch=*myString*

       [IndexingFields]
       Property=IndexFields
       PropertyFieldCSVs=*/FIELD/_ATTR_ANIMAL,*/FIELD/_ATTR_COLOR,*/ROOM/_ATTR_Name,*/ITEM/_ATTR_Type

4. Create a section for your indexing property in which you set the Index parameter to `True`.

   For example:

       [MyFirstProperty]
       HiddenType=True

       [IndexFields]
       Index=True

5. Save and close the configuration file.

6. Restart the IDOL Content component for your changes to take effect.

Copyright 2023 Open Text
Version 24.1 | Last updated December 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL Server 24.1

Topic Title: Index XML Attributes