Elasticlunr.Field (Elasticlunr v0.1.1) View Source

Link to this section Summary

Link to this section Types

Specs

document() :: %{id: Elasticlunr.Index.document_ref(), content: binary()}

Specs

flnorm() :: integer() | float()

Specs

t() :: %Elasticlunr.Field{
  documents: map(),
  flnorm: flnorm(),
  idf: map(),
  ids: map(),
  pipeline: Elasticlunr.Pipeline.t() | nil,
  query_pipeline: Elasticlunr.Pipeline.t() | nil,
  store: boolean(),
  store_positions: boolean(),
  terms: map(),
  tf: map()
}

Specs

token_info() :: %{
  term: term(),
  tf: map(),
  idf: map(),
  flnorm: flnorm(),
  documents: map()
}

Link to this section Functions

Specs

add(t(), [document()]) :: t()

Specs

Link to this function

analyze(field, str, options)

View Source

Specs

analyze(t(), any(), keyword()) ::
  Elasticlunr.Token.t() | [Elasticlunr.Token.t()]

Specs

get_token(t(), binary()) :: token_info() | nil

Specs

has_token(t(), binary()) :: boolean()

Specs

new(keyword()) :: t()
Link to this function

remove(field, document_ids)

View Source

Specs

remove(t(), [Elasticlunr.Index.document_ref()]) :: t()
Link to this function

set_query_pipeline(field, pipeline)

View Source

Specs

set_query_pipeline(t(), module()) :: t()
Link to this function

term_frequency(field, term)

View Source

Specs

term_frequency(t(), binary()) :: map()

Specs

terms(t(), keyword()) :: any()
Link to this function

update(field, documents)

View Source

Specs

update(t(), [document()]) :: t()