Package ai.vectros.types
Class DocumentRequest
java.lang.Object
ai.vectros.types.DocumentRequest
-
Method Details
-
getTitle
- Returns:
- Human-readable document title
-
getText
- Returns:
- Raw text content to ingest. Required when creating a document via the text-ingest path. On update, supply it to replace the stored text; omit it to leave the existing text unchanged.
-
getIndexMode
- Returns:
- Indexing strategy for this document.
HYBRIDruns both BM25 keyword and dense-vector semantic indexing (recommended for most use cases).SEMANTICindexes only as dense vectors — best for conceptual similarity search.TEXTindexes only with BM25 — best for exact keyword matching.NONEstores the document without search indexing (store-only / archival): it remains retrievable by id and by structured-field lookup but never appears in search results. Optional: omit to inherit the bound schema's default index mode. If neither this field nor the schema specifies one, the request is rejected. When both are set, this per-document value wins.
-
getFolderId
- Returns:
- ID of the folder to place this document in. On create, omit to use your account's default root folder. On update, omit to leave unchanged — this field cannot currently be cleared once set.
-
getPayload
- Returns:
- The document's structured data, as a flat key/value object. When
schemaIdis set, declared fields are validated against the schema and its lookup fields become directly queryable viaGET /v1/documents?type=&field=&value=(sensitive fields are blind-indexed); undeclared keys pass through as free-form and are searchable via thefiltersparameter onPOST /v1/search. A strict schema rejects undeclared keys. On update, the supplied object replaces the stored payload in full (it is not key-merged); omit to leave it unchanged.
-
getSchemaId
- Returns:
- Optional ID of a record schema to bind this document to. When set, the document's
payloadis validated against the schema's fields on save, and the schema's lookup fields become directly queryable (the same behavior as records). On update, omit to leave unchanged.
-
getUserId
- Returns:
- Owning user ID — the Vectros-assigned UUID of a user in your account. Optional. With an API key, sets the document's owner explicitly. With a scoped token the owning user is attributed by the server from your credential and cannot be set to a different user; supplying one that conflicts is rejected.
-
getScopes
- Returns:
- The document's scope ownership, as
namespace:valueentries (at most 2 namespaces) — for example["org:6ba7b810-9dad-11d1-80b4-00c04fd430c8", "group:eng-team"].organdclientare reserved namespace names, registered like any other; others are namespaces you registered yourself (lowercase, 2-32 chars). Avalueis 1-128 characters: a letter or digit first, then letters, digits,_or-. Resolve a namespace's UUID from your own identifier withGET /v1/entities/{namespace}?externalId=. When supplied, this is the document's COMPLETE scope declaration: each entry must fall inside thedata_scopeof a single clause of your credential that also grants this write — your identity supplies the DEFAULT value when you state none, it does not limit which value you may state. An empty array creates a document owned by the calling user alone (the private tier), and requires a credential whose identity carries a user. Omit the field to inherit the token's full identity — the default. On update, omit to leave ownership unchanged, or supply the complete new selection ([]clears it). Filter lists by these values with?scope=.
-
getExternalId
- Returns:
- Stable, caller-supplied identifier for this document. Optional. Immutable after create. Unique within your account and context: posting again with the same
externalIdreturns the existing document (idempotent ingest), and it is the key other records use to reference this one. Max 256 characters.
-
getExpectedVersion
- Returns:
- Optimistic-concurrency token. Pass the
versionyou last read (from a GET or a prior write response) to make this update conditional — it is rejected with409 VERSION_CONFLICTif the document was modified since, leaving the stored document untouched. Omit for last-write-wins (the default). Ignored on create.
-
getStatus
- Returns:
- Caller-controlled lifecycle status.
ACTIVE(the default) keeps the document live and searchable;ARCHIVEDsoft-retracts it — the document is pulled from search/recall but kept and recoverable (set it back toACTIVEto re-index and restore). Use this to retire superseded content without deleting it. On update, omit to leave the current lifecycle status unchanged. Distinct from the read-onlyindexStatus(the processing pipeline).
-
equals
-
getAdditionalProperties
-
hashCode
public int hashCode() -
toString
-
builder
-