DocShell.Presentation.SearchEntry (DocShell v0.3.0)

Copy Markdown View Source

One searchable document, flattened to plain text.

tokens is a pre-split lowercase form of content. It defaults to an empty list because many search engines tokenize the text themselves. Hosts that need precomputed tokens set search_tokens: true in config :doc_shell or the options to DocShell.Presentation.StaticGenerator. Enabling tokens increases the artifact size in exchange for doing that work at build time.

audience and locale are null when the producer does not scope entries that way. They are always present so a renderer can filter without first checking which producer it is reading.

Summary

Types

t()

@type t() :: %DocShell.Presentation.SearchEntry{
  audience: String.t() | nil,
  content: String.t(),
  id: String.t(),
  kind: String.t() | nil,
  locale: String.t() | nil,
  path: String.t(),
  title: String.t(),
  tokens: [String.t()]
}