Table of Contents

Method Create

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Create(string, Schema, IndexSettings?)

Creates a new index in directory, creating the directory if needed.

public static SearchIndex Create(string directory, Schema schema, IndexSettings? settings = null)

Parameters

directory string

The index directory.

schema Schema

The index's fields.

settings IndexSettings

Doc store compression and other settings, or null for Default. They're saved with the index.

Returns

SearchIndex

Exceptions

TantivyException

With IndexAlreadyExists if the directory already holds an index, or InvalidArgument if the settings don't fit the schema.