Replace the filter attributes of a corpus
POST/v2/corpora/:corpus_key/replace_filter_attributes
Replace the filter attributes of a corpus. This does not happen immediately, as this operation creates a job that completes asynchronously. These new filter attributes will not work until the job completes.
You can monitor the status of the filter change using the returned job ID. The
corpus_key
uniquely identifies the corpus. For more information, see
Corpus Key Definition.
Request
Path Parameters
Possible values: <= 50 characters
, Value must match regular expression [a-zA-Z0-9_\=\-]+$
The unique key identifying the corpus having its filters replaced.
Header Parameters
Possible values: >= 1
The API will make a best effort to complete the request in the specified seconds or time out.
Possible values: >= 1
The API will make a best effort to complete the request in the specified milliseconds or time out.
- application/json
Body
- Array [
- ]
filter_attributes object[]required
The new filter attributes.
The JSON path of the filter attribute in a document or document part metadata.
Possible values: [document
, part
]
Indicates whether this is a document or document part metadata filter.
Description of the filter. May be omitted.
Default value: true
Indicates whether an index should be created for the filter. Creating an index will improve query latency when using the filter.
Possible values: [integer
, real_number
, text
, boolean
, list[integer]
, list[real_number]
, list[text]
]
The value type of the filter.
Responses
- 200
- 403
- 404
Successfully created a job that will replace the filter attributes.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: Value must match regular expression job_.+$
Job that was created in order to replace filter attributes.
{
"job_id": "string"
}
Permissions do not allow replacing filter attributes.
- application/json
- Schema
- Example (from schema)
Schema
The messages describing why the error occurred.
The ID of the request that can be used to help Vectara support debug what went wrong.
{
"messages": [
"Internal server error."
],
"request_id": "string"
}
Corpus not found.
- application/json
- Schema
- Example (from schema)
Schema
The ID cannot be found.
ID of the request that can be used to help Vectara support debug what went wrong.
{
"id": "string",
"messages": [
"string"
],
"request_id": "string"
}