{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nuix/main/json-schema/nuix-bulk-searcher-request-schema.json",
  "title": "BulkSearcherRequest",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nuix-core-engine-rest-api-openapi.yml#/components/schemas/BulkSearcherRequest",
  "type": "object",
  "properties": {
    "includeFamilies": {
      "type": "boolean",
      "description": "Whether item families should also be matched. Defaults to false.",
      "default": false
    },
    "deduplicateFamilies": {
      "type": "boolean",
      "description": "Whether deduplicated item families should also be matched. Defaults to false.",
      "default": false
    },
    "omitExcludedItems": {
      "type": "boolean",
      "description": "Whether excluded items should be excluded from matches. Defaults to true.",
      "default": true
    },
    "omitImmaterialFamilyItems": {
      "type": "boolean",
      "description": "Whether immaterial family items should be excluded from family item and deduplicated family item matches. Defaults to true.",
      "default": true
    },
    "tagUniqueItems": {
      "type": "boolean",
      "description": "Whether to record items that only matched a single query. Defaults to false.",
      "default": false
    },
    "matchingItemsAction": {
      "type": "string",
      "description": "Action to take when a matching item is found. Tagging is performed when this option is \"ADD_TAGS\". Defaults to \"ADD_TAGS\".",
      "enum": [
        "addTags",
        "removeTags",
        "none"
      ],
      "default": "addTags"
    },
    "createUnusedTags": {
      "type": "boolean",
      "description": "Whether to create tags even if no items match them. Only has effect if matchingItemsAction == \"addTags\". Defaults to false.",
      "default": false
    },
    "removeEmptyTags": {
      "type": "boolean",
      "description": "Whether to remove tags from the case if there are no longer any items that match them. Only has effect if matchingItemsAction == \"removeTags\". Defaults to false.",
      "default": false
    },
    "showTagColumns": {
      "type": "boolean",
      "description": "Whether to show the tag name columns in the results table. Defaults to true.",
      "default": true
    },
    "allowDuplicateTags": {
      "type": "boolean",
      "description": "Whether the same tag can be applied on more than one row with different queries. Defaults to true.",
      "default": true
    },
    "allowDuplicateQueries": {
      "type": "boolean",
      "description": "Whether the same query can be applied on more than one row with different tags. Defaults to true.",
      "default": true
    },
    "countResponsiveItems": {
      "type": "boolean",
      "description": "Whether to compile counts for responsive items.",
      "default": false
    },
    "tagResponsiveItemsEnabled": {
      "type": "boolean",
      "description": "Whether to apply tags to responsive items. Only has an effect if countResponsiveItems is true and tagResponsiveItemsTag is non-null.",
      "default": false
    },
    "tagResponsiveItemsTag": {
      "type": "string",
      "description": "What tag to apply to responsive items. Only has an effect if both countResponsiveItems and tagResponsiveItemsEnabled are true.",
      "default": null
    },
    "missingTagsAction": {
      "type": "string",
      "description": "What to do when a tag is missing in a table row. Does not affect blank rows. Defaults to FILL_WITH_QUERY.",
      "enum": [
        "fillWithQuery",
        "fillWithRowNumber",
        "showValidationError"
      ],
      "default": "fillWithQuery"
    },
    "expandTags": {
      "type": "boolean",
      "description": "Whether tags for top-level item matches and family item matches should be expanded according to the tagExpansion map. Defaults to true.",
      "default": true
    },
    "tagExpansion": {
      "$ref": "#/$defs/TagExpansion"
    },
    "scopingQuery": {
      "type": "string",
      "description": "A query that restricts the scope of all queries in the file. i.e. a common query that is joined with every individual query to limit the items that it can match. Defaults to an empty string.",
      "default": ""
    },
    "searchFields": {
      "type": "array",
      "description": "A list of fields to search. If null is passed in or this field is not set or empty then a list of default search fields is used (which consists of \"CONTENT\", \"PROPERTIES\", \"NAME\" and \"PATH_NAME\").",
      "items": {
        "type": "string",
        "enum": [
          "content",
          "properties",
          "name",
          "path-name",
          "evidence-metadata"
        ]
      }
    },
    "tagRequests": {
      "type": "array",
      "description": "A list of tag requests to perform.",
      "items": {
        "$ref": "#/$defs/TagRequest"
      }
    }
  },
  "required": [
    "tagRequests"
  ],
  "$defs": {
    "TagExpansion": {
      "type": "object",
      "properties": {
        "directMatchPrefix": {
          "type": "string",
          "description": "A prefix to apply to direct matches, i.e. items that match the given query, or null not to apply a prefix. Defaults to null."
        },
        "directMatchSuffix": {
          "type": "string",
          "description": "A suffix to apply to direct matches, i.e. items that match the given query, or null not to apply a suffix. Defaults to null."
        },
        "topLevelMatchPrefix": {
          "type": "string",
          "description": "A prefix to apply to top-level item matches, or null not to apply a prefix. Only has an effect if includeFamilies == true. Defaults to null."
        },
        "topLevelMatchSuffix": {
          "type": "string",
          "description": "A suffix to apply to top-level item matches, or null not to apply a suffix. Only has an effect if includeFamilies == true. Defaults to null."
        },
        "familyMatchPrefix": {
          "type": "string",
          "description": "A prefix to apply to family item matches, or null not to apply a prefix. Only has an effect if includeFamilies == true. Defaults to null."
        },
        "familyMatchSuffix": {
          "type": "string",
          "description": "A suffix to apply to family item matches, or null not to apply a suffix. Only has an effect if includeFamilies == true. Defaults to null."
        },
        "deduplicatedTopLevelMatchPrefix": {
          "type": "string",
          "description": "A prefix to apply to deduplicated top-level item matches, or null not to apply a prefix. Only has an effect if deduplicateFamilies == true. Defaults to null."
        },
        "deduplicatedTopLevelMatchSuffix": {
          "type": "string",
          "description": "A suffix to apply to deduplicated top-level item matches, or null not to apply a suffix. Only has an effect if deduplicateFamilies == true. Defaults to null."
        },
        "deduplicatedFamilyMatchPrefix": {
          "type": "string",
          "description": "A prefix to apply to deduplicated family item matches, or null not to apply a prefix. Only has an effect if deduplicateFamilies == true. Defaults to null."
        },
        "deduplicatedFamilyMatchSuffix": {
          "type": "string",
          "description": "A suffix to apply to deduplicated family item matches, or null not to apply a suffix. Only has an effect if deduplicateFamilies == true. Defaults to null."
        },
        "uniqueMatchPrefix": {
          "type": "string",
          "description": "A prefix to apply to unique item matches, or null not to apply a prefix. Only has an effect if tagUniqueItems == true. Defaults to null."
        },
        "uniqueMatchSuffix": {
          "type": "string",
          "description": "A suffix to apply to unique item matches, or null not to apply a prefix. Only has an effect if tagUniqueItems == true. Defaults to null."
        }
      }
    },
    "TagRequest": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "The query to use to find matching items to tag."
        },
        "tag": {
          "type": "string",
          "description": "The name of the tag to apply or create."
        }
      }
    }
  }
}