What is a schema?
A schema in Documind defines the structure of data to be extracted from a document. Think of it as a blueprint or template that guides the extraction process to retrieve the correct information in the desired format.What can a schema do?
Schemas are used to:- Define the fields to extract.
- Specify the type of data for each field (e.g.,
string
,number
,array
,enum
,boolean
). - Set the relationships between fields (e.g., nested arrays or objects).
Defining a Schema
In Documind, a schema is defined as an array of objects, each representing a field to be extracted. Each field object includes the following properties:A unique identifier for the field.
A brief explanation of what the field represents.
The type of data. Options are:
string
, number
, array
, object
, enum
, boolean
.Used when the field type is
enum
, to specify available options.Nested fields for
array
or object
types.Example Schema
Here’s an example schema for a bank statement:Bank statement schema