
StoredDocument
- Namespace
- Rowles.LeanCorpus.Mapping
- Assembly
- Rowles.LeanCorpus.dll
Snapshot of stored-field data for a single document, as returned by GetStoredFields(int) and GetStoredBinaryFields(int).
public readonly record struct StoredDocument : IEquatable<StoredDocument>
- Implements
StoredDocument(IReadOnlyDictionary<string, IReadOnlyList<string>>, IReadOnlyDictionary<string, IReadOnlyList<byte[]>>)
Snapshot of stored-field data for a single document, as returned by GetStoredFields(int) and GetStoredBinaryFields(int).
BinaryFields
Binary stored-field values indexed by field name.
Empty
An empty StoredDocument with no fields.
Fields
String stored-field values indexed by field name.
Create(IReadOnlyDictionary<string, IReadOnlyList<string>>?, IReadOnlyDictionary<string, IReadOnlyList<byte[]>>?)
Builds a StoredDocument from the supplied dictionaries. Null arguments are replaced with empty read-only dictionaries.
GetFirst(string)
Returns the first string value for the named field, or null when the field is missing or empty.
GetFirstBinary(string)
Returns the first binary value for the named field, or null when the field is missing or empty.
GetValues(string)
Returns all string values for the named field, or an empty list.
TryGetValues(string, out IReadOnlyList<string>)
Attempts to get all string values for the named field without treating a missing field as an empty collection.