Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Creating and editing content classes

Each content class contains a list of content properties. Each content property has these settings:

  • Type: The type of content that the property can extract fields values from:
    • XML: The property uses XPath to extract values from XML.
    • JSON: The property uses JSONPath to extract values from JSON.
    • PATTERN: The property uses regular expressions to extract values from any type of text-based file.
  • Name: The name to assign to the resulting field. Add this field to an index collection to allow users to search using this field.

    For a field to be indexed, its name:

    • Cannot contain hyphens (-) or any other special characters.
    • Cannot start with underscores (_) or numbers.
  • Expression: An XPath, JSONPath, or regular expression used to match the contents of a document.
NoteFor information on using a content class to normalize field names, see Best practices for writing content classes.

Related links:

Creating and adding fields to a content class

Procedure

  1. Click the Content Classes window.

  2. Click Create Content Class.

  3. Enter a name and, optionally, a description for the class. Then click Create.

  4. To add fields manually:

    1. On the Content Properties tab, click Edit Properties.

    2. Click Add Content Property to add a new field.

    3. In the new field, select a Type.

    4. In the Name field, enter a name for the field.

    5. In the Expression field, enter an expression that matches the type you selected:

      • For XML, XPath.
      • For JSON, JSONPath.
      • For PATTERN, regular expression.
    6. Click Save.

  5. To create fields through the system:

    1. Click the Extract Fields tab.

    2. Paste some sample XML or JSON into the box on the XML or JSON tab.

      Use XML or JSON that's representative of the XML or JSON files that you want to index.

    3. Click Extract.

      The extracted fields appear at the bottom of the page.

    4. Select the fields you want.

    5. Click Add Selected Properties.

      The fields you selected are added to the content class.

 

  • Was this article helpful?