
IndexSchema
- Namespace
- Rowles.LeanLucene.Index.Indexer
- Assembly
- Rowles.LeanLucene.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
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.