[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eINFORMATION_SCHEMA.SEARCH_INDEXES\u003c/code\u003e view provides metadata for each search index within a dataset, with each row representing a unique index.\u003c/p\u003e\n"],["\u003cp\u003eAccessing search index metadata requires either the \u003ccode\u003ebigquery.tables.get\u003c/code\u003e or \u003ccode\u003ebigquery.tables.list\u003c/code\u003e IAM permission on the indexed table, which are included in several predefined IAM roles such as \u003ccode\u003eroles/bigquery.admin\u003c/code\u003e and \u003ccode\u003eroles/bigquery.dataViewer\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe view's schema includes details like \u003ccode\u003eindex_name\u003c/code\u003e, \u003ccode\u003eindex_status\u003c/code\u003e, \u003ccode\u003ecreation_time\u003c/code\u003e, \u003ccode\u003eDDL\u003c/code\u003e, \u003ccode\u003ecoverage_percentage\u003c/code\u003e, \u003ccode\u003eanalyzer\u003c/code\u003e and more, offering comprehensive information about each search index.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eindex_status\u003c/code\u003e field indicates the current state of the index, such as \u003ccode\u003eACTIVE\u003c/code\u003e, \u003ccode\u003ePENDING DISABLEMENT\u003c/code\u003e, \u003ccode\u003eTEMPORARILY DISABLED\u003c/code\u003e, or \u003ccode\u003ePERMANENTLY DISABLED\u003c/code\u003e, each having different implications on its usability and storage charges.\u003c/p\u003e\n"],["\u003cp\u003eQueries to this view must use a dataset qualifier, specifying the \u003ccode\u003ePROJECT_ID\u003c/code\u003e and \u003ccode\u003eDATASET_ID\u003c/code\u003e, and its scope is limited to the dataset's location, allowing users to retrieve metadata for search indexes within a specific dataset.\u003c/p\u003e\n"]]],[],null,["# SEARCH_INDEXES view\n===================\n\nThe `INFORMATION_SCHEMA.SEARCH_INDEXES` view contains one row for each search\nindex in a dataset.\n\nRequired permissions\n--------------------\n\nTo see [search index](/bigquery/docs/search-index) metadata, you need the\n`bigquery.tables.get` or `bigquery.tables.list` Identity and Access Management (IAM)\npermission on the table with the index. Each of the following predefined\nIAM roles includes at least one of these permissions:\n\n- `roles/bigquery.admin`\n- `roles/bigquery.dataEditor`\n- `roles/bigquery.dataOwner`\n- `roles/bigquery.dataViewer`\n- `roles/bigquery.metadataViewer`\n- `roles/bigquery.user`\n\nFor more information about BigQuery permissions, see\n[Access control with IAM](/bigquery/docs/access-control).\n\nSchema\n------\n\nWhen you query the `INFORMATION_SCHEMA.SEARCH_INDEXES` view, the query results contain one row for each search index in a dataset.\n\n\u003cbr /\u003e\n\nThe `INFORMATION_SCHEMA.SEARCH_INDEXES` view has the following schema:\n\nScope and syntax\n----------------\n\nQueries against this view must have a [dataset qualifier](/bigquery/docs/information-schema-intro#syntax). The\nfollowing table explains the region scope for this view:\n\nReplace the following:\n\n- Optional: \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project. If not specified, the default project is used.\n- \u003cvar translate=\"no\"\u003eDATASET_ID\u003c/var\u003e: the ID of your dataset. For more information, see [Dataset qualifier](/bigquery/docs/information-schema-intro#dataset_qualifier).\n\n\u003cbr /\u003e\n\n**Example** \n\n -- Returns metadata for search indexes in a single dataset.\n SELECT * FROM myDataset.INFORMATION_SCHEMA.SEARCH_INDEXES;\n\nExample\n-------\n\nThe following example shows all active search indexes on tables in the dataset\n`my_dataset`, located in the project `my_project`. It includes their names, the\nDDL statements used to create them, their coverage percentage, and their\ntext analyzer. If an indexed base table is\nless than 10GB, then its index is not populated, in which case\n`coverage_percentage` is 0. \n\n SELECT table_name, index_name, ddl, coverage_percentage, analyzer\n FROM my_project.my_dataset.INFORMATION_SCHEMA.SEARCH_INDEXES\n WHERE index_status = 'ACTIVE';\n\nThe results should look like the following: \n\n```\n+-------------+-------------+--------------------------------------------------------------------------------------+---------------------+----------------+\n| table_name | index_name | ddl | coverage_percentage | analyzer |\n+-------------+-------------+--------------------------------------------------------------------------------------+---------------------+----------------+\n| small_table | names_index | CREATE SEARCH INDEX `names_index` ON `my_project.my_dataset.small_table`(names) | 0 | NO_OP_ANALYZER |\n| large_table | logs_index | CREATE SEARCH INDEX `logs_index` ON `my_project.my_dataset.large_table`(ALL COLUMNS) | 100 | LOG_ANALYZER |\n+-------------+-------------+--------------------------------------------------------------------------------------+---------------------+----------------+\n```"]]