Documents

Documents are stored within Collections and contain both metadata and text. These units of content power features like vector search, filtering, and semantic search. Documents can be created manually or uploaded in bulk, and metadata can be customized for sorting and filtering. Scout’s dashboard or API enables document management for advanced use cases such as content clustering and search optimization.

How to Use Documents

Creating Documents

Refer to Uploading & Creating Documents for detailed instructions on how to create and upload documents.

Document Attributes

id
stringRequired

A unique identifier for the document. If a document with this ID already exists, it will be overwritten.

text
stringRequired

The main content of the document, which will be indexed for semantic search.

You can add metadata (custom fields) to a Document. These fields can be of different data types like text, number, date, etc. For example, here are some Documents with added metadata fields:

1{
2 "documents": [
3 {
4 "id": "document_id",
5 "text": "document text",
6 "title": "document title",
7 "url": "https://example.com"
8 },
9 {
10 "id": "document_id_2",
11 "text": "document text 2",
12 "title": "document title 2",
13 "tags": ["tag_1", "tag_2"]
14 }
15 ]
16}

Editing Documents

The dashboard provides a list view of all documents in a Collection; you can edit existing documents to update the text content or metadata. If you are manually entering text, you can use Markdown to format the document content.