Choosing the right base type impacts validation, query performance, and downstream processors. Use the tables and examples below to align schema design with your use cases.
Primitive Types
Primitive types represent atomic values with specific validation patterns and search capabilities.Text and String Types
Symbol (symbol
)
A sequence of Unicode characters for general text content.
- Example Usage
- Pattern
Code (code
)
A string with specific formatting rules—no leading/trailing whitespace, single spaces only.
- Example Usage
- Pattern
Markdown (markdown
)
GitHub Flavored Markdown syntax for rich text content.
- Example Usage
- Pattern
URI (uri
)
String used to identify a name or a resource within a namespace.
- Example Usage
- Pattern
URL (url
)
A URI that is a literal web reference.
- Example Usage
- Pattern
Numerical Types
Integer (integer
)
Whole numbers with pattern validation.
- Example Usage
- Pattern & Format
Decimal (decimal
)
Rational numbers with implicit precision for financial and measurement data.
- Example Usage
- Pattern
Temporal Types
Date (date
)
Date or partial date without timezone information.
- Example Usage
- Pattern
DateTime (datetime
)
Date and time with optional timezone specification.
- Example Usage
Time (time
)
Time of day without date information.
- Example Usage
- Pattern
Instant (instant
)
Precise moment in time, known at least to the second.
- Example Usage
Always include timezone information for absolute precision.
Other Primitive Types
Boolean (boolean
)
Simple true/false values for binary states.
- Example Usage
Geopoint (geopoint
)
Geographic coordinates for location-based data.
- Example Usage
XHTML (xhtml
)
Escaped HTML content following XHTML specifications.
- Example Usage
Composite Types
Composite types assemble primitives into reusable structures.Array (array
)
Ordered collections of items of the same type.
- Profile Definition
- Usage Example
Object (object
)
Custom structures that bundle multiple properties.
- Profile Definition
- Resource Example
Type usage in practice
Profile definition
Use base types in profiles to define the shape of your resources:Search compatibility
Different types support different search operators:Type Category | Types | Supported Operators | Use Cases |
---|---|---|---|
Text Types | symbol , code , markdown | eq , match , any , all | Full-text search and exact matching |
Numeric Types | integer , decimal | eq , lt , gt , any , all | Range queries and numerical comparisons |
Temporal Types | date , datetime , time , instant | eq , lt , gt | Date range filtering and temporal queries |
Geographic Types | geopoint | geoDistance | Location-based search and proximity queries |
Arrays inherit operators from their item type. An array of
symbol
supports text operators (eq
, match
, any
, all
), while an array of integer
supports numeric operators (eq
, lt
, gt
, any
, all
).Processing pipelines
Types determine processor compatibility:Processor | Compatible Types | Purpose | Documentation |
---|---|---|---|
Segmenters | symbol , markdown | Break down large text content into manageable chunks for processing | Segmenters → |
Vectorizers | symbol , markdown , arrays of symbol | Transform text content into vector embeddings for semantic search | Vectorizers → |