You can only delete a schema if all of the documents associated with the schema
are deleted. Otherwise, the attempt fails. After you delete a schema, you can
call the schemas.create
method to create a new one.
To delete a schema for structured data, follow these steps:
REST
Find your data store ID. If you already have your data store ID, skip to the next step.
In the Google Cloud console, go to the AI Applications page and in the navigation menu, click Data Stores.
Click the name of your data store.
On the Data page for your data store, get the data store ID.
Delete your schema.
curl -X DELETE \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1beta/projects/PROJECT_ID/locations/global/collections/default_collection/dataStores/DATA_STORE_ID/schemas/default_schema"
Replace the following:
PROJECT_ID
: the ID of your project.DATA_STORE_ID
: the ID of your data store.
C#
For more information, see the Vertex AI Search C# API reference documentation.
To authenticate to Vertex AI Search, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Go
For more information, see the Vertex AI Search Go API reference documentation.
To authenticate to Vertex AI Search, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
For more information, see the Vertex AI Search Java API reference documentation.
To authenticate to Vertex AI Search, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
For more information, see the Vertex AI Search Python API reference documentation.
To authenticate to Vertex AI Search, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Ruby
For more information, see the Vertex AI Search Ruby API reference documentation.
To authenticate to Vertex AI Search, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.