Table of Contents

Class IndexSettings

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Settings chosen when an index is created (Create(string, Schema, IndexSettings?), CreateInRam(Schema, IndexSettings?)). They're saved with the index and can't be changed later; Settings reports them.

public sealed class IndexSettings
Inheritance
IndexSettings
Inherited Members

Properties

Default

The settings used when none are given.

DocStoreBlockSize

Uncompressed size in bytes of each doc store block. Larger blocks compress better, but loading one hit's stored fields decompresses its whole block. Default 16 KB.

DocStoreCompression

How stored fields are compressed. Default Lz4.

SortBy

Stores documents in the order of a fast field (u64, i64, f64, date, text or bytes) instead of insertion order, or null (the default) for insertion order. Searches sorted by that field can then stop early. Must be Field(string, bool), not a score.

ZstdLevel

The Zstandard level, 1 (fastest) to 22 (smallest), or null for zstd's default (3). Only valid with Zstd.

Methods

ToString()

For example DocStoreCompression = Zstd, ZstdLevel = 9, DocStoreBlockSize = 16384, SortBy = year desc.