
IndexSchema
- Namespace
- Rowles.LeanCorpus.Index.Indexer
- Assembly
- Rowles.LeanCorpus.dll
Defines per-field type expectations and validation rules for an index. When set on Schema, documents are validated at AddDocument(LeanDocument) time.
public sealed class IndexSchema
- Inheritance
-
IndexSchema
Mappings
All registered field mappings.
StrictMode
When true, documents containing fields not defined in the schema are rejected. When false, unknown fields are silently accepted. Default: false.
Add(FieldMapping)
Adds a field mapping to the schema. Returns this for fluent chaining.
Validate(LeanDocument)
Validates a document against this schema. Throws SchemaValidationException on the first violation found.