Advanced Metadata Query

The section describes how to query metadata based on custom query conditions. The query conditions support the AND and OR relationships between metadata fields, making the query more flexible, complex, and accurate.

Procedure

  1. Choose Monitor > Data Pilot > SmartIndexing.
  2. Click Query.

    The Query Metadata page is displayed.

  3. Click the Advanced Query tab.
  4. Set query conditions in a condition group. You can add multiple condition groups.

    1. Table 1 describes the parameters that can be set for each condition group.
      Name, Path, Type, Extended File Attribute, Custom Object Metadata, and Custom Tag support precise query and prefix-based fuzzy query. Owning Account and Namespace only support precise query.
      • In a non-domain controller scenario, the user/user group name and ID must be the same as those on the client.
      • In a domain controller scenario, you are not advised to create a user or user group. If you want to create a user or user group, the user/user group name and ID must be the same as those on the client.
      • It is recommended that the names and IDs of different types of users or user groups be different. For example, the names and IDs of local UNIX authentication users/user groups, LDAP domain users/user groups, and NIS domain users/user groups are different.
      Table 1 Condition group parameters

      Parameter

      Description

      Name

      Name of a file or object, excluding the path.

      Owning Account

      Name of an account to which a file or object belongs.

      NOTE:

      If the owning account is system and the root user or user group is used as the search condition, you need to manually create the local root authentication user or user group of UNIX. Otherwise, no data will be found. For details, see Configuring and Managing UNIX Users.

      Namespace

      Namespace to which a file or object belongs.

      Path

      Path of a file, object, or directory.

      Type

      Type of a file or directory.

      • When you query metadata by file type, enter the suffix corresponds to a file type, for example, pdf.
      • When you query metadata by directory, enter directory.

      Size

      Size of a file or object.

      Unit: byte

      Last Modified

      Time when a file, object, or directory is last modified.

      Last Accessed

      Time when a file, object, or directory is last accessed.

      NOTE:

      This parameter requires the Automatic Update of Atime function to be enabled for the corresponding namespace. After the function is enabled, system performance will be affected.

      Created

      Time when a file or object is created.

      UNIX User ID

      UNIX user ID when the NFS protocol is used.
      • Supports local UNIX authentication users, LDAP domain users, and NIS domain users.
      • For Windows or object users, you need to configure the mappings between them and UNIX users and use the corresponding UNIX user IDs to perform queries.

      UNIX User Group ID

      UNIX user group ID when the NFS protocol is used.

      • Supports local UNIX authentication user groups, LDAP domain user groups, and NIS domain user groups.
      • For Windows or object users, you need to configure the mappings between them and UNIX users and use the corresponding UNIX user group IDs to perform queries.

      UNIX User

      UNIX user name when the NFS protocol is used.
      • Supports local UNIX authentication users, LDAP domain users, and NIS domain users.
      • For Windows or object users, you need to configure the mappings between them and UNIX users and use the corresponding UNIX user names to perform queries.
      • You are advised to set different names for users of different domain controllers. Otherwise, query results will be inaccurate.

      UNIX User Group

      UNIX user group name when the NFS protocol is used.
      • Supports local UNIX authentication user groups, LDAP domain user groups, and NIS domain user groups.
      • For Windows or object users, you need to configure the mappings between them and UNIX users and use the corresponding UNIX user group names to perform queries.
      • You are advised to set different names for user groups of different domain controllers. Otherwise, query results will be inaccurate.

      Extended File Attribute

      Attribute xattr of a file.

      You can use the xattr API to set the custom metadata of a file. This condition is used to query the file list by custom metadata.

      Custom Object Metadata

      Custom metadata of an object.

      When uploading an object, you can customize the metadata header of the object. This condition is used to query the object list by custom metadata.

      Custom Tag

      Custom label of an object.

      If a user or user group exists in a selected condition, you can select only one user or user group. You must select only one account to which the user or user group belongs. The condition relationship is AND.

    2. Click Add Condition to add a condition in the current condition group.
    3. (Optional) Click to remove an unnecessary condition.
    4. In Condition Relationship, select the relationship between conditions.
      • And: The relationship between conditions is AND. That is, the filtered files or objects must meet all conditions.
      • Or: The relationship between conditions is OR. That is, the filtered files or objects meet one of the conditions.

  5. (Optional) Add a condition group.

    1. Click Add Condition Group to set conditions for the condition group to be added.
    2. (Optional) To remove an unnecessary condition group, click Remove in the upper right corner of the area where the condition group is located.
    3. In Condition Group Relationship, select the relationship between condition groups.
      • And: The current condition group is in the AND relationship with other condition groups. That is, the filtered files or objects must meet both the current condition group and other condition groups.
      • Or: The current condition group is in the OR relationship with other condition groups. That is, the filtered files or objects meet the current condition group or another condition group.

  6. (Optional) Click Reset to clear all configured parameters.
  7. Click OK.

    A maximum of 10,000 results can be queried.