Elasticlunr.Index (Elasticlunr v0.6.6) View Source

Link to this section Summary

Link to this section Types

Specs

document_field() :: atom() | binary()

Specs

search_query() :: binary() | map()

Specs

search_result() :: any()

Specs

t() :: %Elasticlunr.Index{
  documents_size: integer(),
  fields: map(),
  name: atom() | binary(),
  on_conflict: atom(),
  pipeline: Elasticlunr.Pipeline.t(),
  ref: Elasticlunr.Field.document_ref(),
  store_documents: boolean(),
  store_positions: boolean()
}

Link to this section Functions

Link to this function

add_documents(index, documents, opts \\ [])

View Source
Link to this function

add_field(index, field, opts \\ [])

View Source

Specs

add_field(t(), document_field(), keyword()) :: t()

Specs

Link to this function

analyze(index, field, content, options)

View Source

Specs

Specs

get_field(t(), document_field()) :: Elasticlunr.Field.t()

Specs

Specs

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

remove_documents(index, document_ids)

View Source

Specs

remove_documents(t(), [Elasticlunr.Field.document_ref()]) :: t()
Link to this function

save_document(index, save)

View Source

Specs

save_document(t(), boolean()) :: t()
Link to this function

search(index, query, opts \\ nil)

View Source

Specs

search(t(), search_query(), map() | nil) :: [search_result()]

Specs

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

update_documents(index, documents)

View Source

Specs

update_documents(t(), [map()]) :: t()
Link to this function

update_field(index, name, field)

View Source

Specs

update_field(t(), document_field(), Elasticlunr.Field.t()) :: t()