Skip to contents

Combine named tnt_field definitions into a schema that can be passed to tnt_index().

Usage

tnt_schema(...)

Arguments

...

Named field definitions, e.g. title = tnt_text().

Value

A tnt_schema object (a named list of tnt_fields).

Examples

tnt_schema(
  id    = tnt_i64(),
  title = tnt_text(stemmer = "english"),
  body  = tnt_text(stemmer = "english")
)
#> 
#> ── tantivyr schema (3 fields) 
#>id: i64
#>title: text [tnt_en]
#>body: text [tnt_en]